Constructor
new SymmetricallyEncryptedDataPacket()
Members
encrypted
Encrypted secret-key data
packets :PacketList
Decrypted packets contained within.
Type:
Methods
(async) decrypt(sessionKeyAlgorithm, key, configopt)
Decrypt the symmetrically-encrypted packet data See RFC 4880 9.2 for algorithms.
Parameters:
Name | Type | Attributes | 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, configopt)
Encrypt the symmetrically-encrypted packet data See RFC 4880 9.2 for algorithms.
Parameters:
Name | Type | Attributes | 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