N/crypto Module Members for SuiteScript Security Functions
The N/crypto module provides SuiteScript developers with functions for hashing, HMAC, and encryption for enhanced security protocols.
TL;DR Opening
The N/crypto module in SuiteScript allows developers to perform critical operations like hashing, HMAC, and symmetrical encryption. This enhances the security and integrity of data within applications, making it essential for developers needing robust security mechanisms.
Overview of the N/crypto Module
The N/crypto module facilitates various cryptographic functions which are crucial in maintaining data integrity and security in SuiteScript applications. By utilizing this module, developers can implement hashing, hash-based message authentication (HMAC), and symmetrical encryption. The functionality of the N/crypto module is augmented by the concurrent loading of the N/encode module.
Key Members of the N/crypto Module
Here are the main members of the N/crypto module and their purposes:
| Member Type | Name | Return Type / Value Type | Supported Script Types | Description |
|---|---|---|---|---|
| Object | crypto.Cipher | Object | Server scripts | Encapsulates a cipher. |
| Object | crypto.CipherPayload | Object | Server scripts | Encapsulates a cipher payload. |
| Object | crypto.Decipher | Object | Server scripts | Encapsulates a decipher. |
| Object | crypto.Hash | Object | Server scripts | Encapsulates a hash. |
| Object | crypto.Hmac | Object | Server scripts | Encapsulates an HMAC. |
| Object | crypto.SecretKey | Object | Server scripts | Encapsulates a secret key handle. |
| Method | crypto.checkPasswordField(options) | boolean | Server scripts | Checks whether a password in a record corresponds to the password entered by the user. |
| Method | crypto.createCipher(options) | Object | Server scripts | Creates and returns a new crypto.Cipher Object. |
| Method | crypto.createDecipher(options) | Object | Server scripts | Creates and returns a new crypto.Decipher object. |
| Method | crypto.createHash(options) | Object | Server scripts | Creates and returns a new crypto.Hash Object. |
| Method | crypto.createHmac(options) | Object | Server scripts | Creates and returns a new crypto.Hmac Object. |
| Method | crypto.createSecretKey(options) | Object | Server scripts | Creates and returns a new crypto.SecretKey Object. |
| Enum | crypto.EncryptionAlg | string (read-only) | Server scripts | Holds the values for supported encryption algorithms. |
| Enum | crypto.HashAlg | string (read-only) | Server scripts | Holds the values for supported hashing algorithms. |
| Enum | crypto.Padding | string (read-only) | Server scripts | Holds the values for supported cipher padding. |
The above table summarizes member types, usage, and descriptions of functionality provided by the N/crypto module.
Key Functions Explained
- Cipher Functions: Utilize the
crypto.Cipherto encapsulate and manage encryption operations. - Hashing: The
crypto.Hashobject offers methods likedigest()andupdate()for creating secure hash values. - HMAC Operations: The
crypto.Hmacobject manages HMAC computations to ensure message integrity. - SecretKey Management: Manage API secrets effectively using
crypto.SecretKeyfor secure access.
Who This Affects
- Roles: This module is primarily relevant for Developers and Administrators working with SuiteScript.
- Modules: Particularly important for applications requiring security features such as authentication and data integrity.
Key Takeaways
- The N/crypto module empowers developers with essential cryptographic functionalities.
- Key member objects facilitate secure data handling in SuiteScript.
- Understanding this module is crucial for implementing robust security measures in applications.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
What prerequisites are necessary to use the N/crypto module in SuiteScript?
Does the N/crypto module require enabling any specific feature in NetSuite?
How does the N/crypto module interact with other modules?
Is the N/crypto module applicable to all script types in NetSuite?
Was this article helpful?
More in Security
- Enable Token-Based Authentication in NetSuite Developer Tools
Token-based authentication is now required for all NetSuite developer tools, enhancing security compliance and aligning with Two-Factor Authentication...
- Security, Privacy, and Compliance Updates in SuiteCloud
Explore the latest updates on security, privacy, and compliance practices in SuiteCloud to enhance developer safety.
- CDN IP Address Ranges and Access Management in NetSuite
Understand CDN IP address ranges and best practices for managing access to NetSuite services without relying on specific IP addresses.
- Login Audit Trail Features for User Activity Tracking
The Login Audit Trail allows tracking user login/logout activity in NetSuite, filtering by date, user, and IP address.
Advertising
Reach Security Professionals
Put your product in front of NetSuite experts who work with Security every day.
Sponsor This Category