N/pgp Module Members for Secure Messaging in NetSuite
The N/pgp module in NetSuite enables secure messaging and PGP encryption, providing methods for message handling and cryptographic key management.
The N/pgp module in NetSuite facilitates secure messaging through various objects and methods that allow developers to handle PGP encryption effectively. This module is essential for server scripts aimed at enhancing security through cryptography.
What Are the Main Components of the N/pgp Module?
The N/pgp module includes various members classified as objects and methods, specifically designed for cryptographic operations. Below are the key members:
Object Members
| Member Name | Return Type | Supported Script Types | Description |
|---|---|---|---|
pgp.Config | Object | Server scripts | General configuration options for message decryption. |
pgp.Key | Object | Server scripts | Cryptographic keys and their metadata. |
pgp.KeyId | Object | Server scripts | An octet scalar that identifies a subkey. |
pgp.Message | Object | Server scripts | Processed PGP data. |
pgp.MessageData | Object | Server scripts | Message data. |
pgp.Verification | Object | Server scripts | Verification results. |
pgp.VerificationSignature | Object | Server scripts | A verification result for a single signature. |
Method Members
| Method Name | Return Type | Supported Script Types | Description |
|---|---|---|---|
pgp.createConfig(options) | pgp.Config | Server scripts | Creates a new configuration object. |
pgp.createMessageData(options) | pgp.MessageData | Server scripts | Creates new message data. |
pgp.createSigner(options) | certificate.Signer | Server scripts | Creates a certificate signer object for signing strings. |
pgp.createVerification() | pgp.Verification | Server scripts | Creates an empty verification object. |
pgp.loadKeyFromSecret(options) | pgp.Key | Server scripts | Loads a key stored securely in secret. |
pgp.parseMessage(options) | pgp.Message | Server scripts | Parses a PGP message. |
pgp.parseKey(options) | pgp.Key | Server scripts | Parses an existing PGP key. |
Enum Members
| Enum Name | Type | Supported Script Types | Description |
|---|---|---|---|
pgp.CompressionAlgorithm | Enum | Server scripts | Holds values for available compression algorithms. |
pgp.Format | Enum | Server scripts | Holds literal data packet type. |
Who Can Benefit from the N/pgp Module?
The N/pgp module is beneficial for developers and administrators looking to implement secure communication mechanisms within their NetSuite environment. It supports operations for managing encrypted messages and cryptographic keys, ensuring data integrity and confidentiality.
Key Code Sample
The following code demonstrates creating a configuration for PGP operations:
const config = pgp.createConfig({ allowInsecureDecryptionWithSigningKeys: true, useRelaxedSignatureParsing: true});This simple snippet sets up the configuration to allow for more flexible decryption settings, showcasing the ability to customize PGP operations effectively.
Key Takeaways
- The N/pgp module provides essential methods and objects for secure messaging and PGP encryption.
- It includes various configuration options, cryptographic keys, and functions for managing encrypted data.
- Suitable for server scripts, allowing seamless integration within the NetSuite platform for enhanced security.
Frequently Asked Questions (4)
Does the N/pgp module support client scripts in NetSuite?
Can I use the N/pgp module to create a signer for signing data?
What method would I use to load a secret-stored cryptographic key using the N/pgp module?
What configurations can be customized when creating a new PGP configuration object?
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...
- 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.
- Security, Privacy, and Compliance Updates in SuiteCloud
Explore the latest updates on security, privacy, and compliance practices in SuiteCloud to enhance developer safety.
- Restricting Role Access to Subsidiaries in NetSuite
Restrict user role access to subsidiaries in NetSuite OneWorld, ensuring data privacy and security for different business units.
Advertising
Reach Security Professionals
Put your product in front of NetSuite experts who work with Security every day.
Sponsor This Category