Constructor
new SymmetricallyEncryptedDataPacket()
Members
encrypted
Encrypted secret-key data
packets :PacketList
Decrypted packets contained within.
Type:
tag :module:enums.packet
Packet type
Type:
Methods
(async) decrypt(sessionKeyAlgorithm, key, config)
Decrypt the symmetrically-encrypted packet data See RFC 4880 9.2 for algorithms.
Parameters:
Name | Type | Description |
---|---|---|
sessionKeyAlgorithm |
module:enums.symmetric | Symmetric key algorithm to use |
key |
Uint8Array | The key of cipher blocksize length to be used |
config |
Object | (optional) full configuration, defaults to openpgp.config |
Throws:
-
if decryption was not successful
- Type
- Error
(async) encrypt(sessionKeyAlgorithm, key, config)
Encrypt the symmetrically-encrypted packet data See RFC 4880 9.2 for algorithms.
Parameters:
Name | Type | Description |
---|---|---|
sessionKeyAlgorithm |
module:enums.symmetric | Symmetric key algorithm to use |
key |
Uint8Array | The key of cipher blocksize length to be used |
config |
Object | (optional) full configuration, defaults to openpgp.config |
Throws:
-
if encryption was not successful
- Type
- Error