pgp.Key
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 For more information, see SuiteScript 2.x Script Types. |
Module |
|
Since |
2022.2 |
Syntax
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
});