pgp.Key

Note:

The content in this help topic pertains to SuiteScript 2.1.

Object Description

Stores multiple cryptographic keys and metadata.

You can use this object in the Message.decrypt(options) and MessageData.encrypt(options) methods.

Note:

You cannot create a new key with the N/pgp Module. You must generate keys from an external third party source that supports key generation. For more information, see Limitations of N/pgp.

Supported Script Types

Server Scripts

Module

N/pgp Module

Since

2022.2

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/pgp Module Script Samples.

            const message =  pgp.parseMessage({value: 'Encrypted Message to be Decrypted'});
 
message.decrypt({ 
   decryptionKeys: keys.ours.pri,
   verificationKeys: keys.our.pub,
   verification: verification
}); 

          

Related Topics

General Notices