Constructor
new SymEncryptedSessionKeyPacket(configopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
Members
aeadAlgorithm :enums.aead
AEAD mode to encrypt the session key with (if AEAD protection is enabled)
Type:
- enums.aead
sessionKeyAlgorithm :enums.symmetric
Algorithm to encrypt the message with
Type:
- enums.symmetric
sessionKeyEncryptionAlgorithm :enums.symmetric
Algorithm to encrypt the session key with
Type:
- enums.symmetric
Methods
(async) decrypt(passphrase)
Decrypts the session key with the given passphrase
Parameters:
Name | Type | Description |
---|---|---|
passphrase |
String | The passphrase in string form |
Throws:
-
if decryption was not successful
- Type
- Error
(async) encrypt(passphrase, configopt)
Encrypts the session key with the given passphrase
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
passphrase |
String | The passphrase in string form |
|
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
Throws:
-
if encryption was not successful
- Type
- Error
read(bytes)
Parsing function for a symmetric encrypted session key packet (tag 3).
Parameters:
Name | Type | Description |
---|---|---|
bytes |
Uint8Array | Payload of a tag 3 packet |
write() → {Uint8Array}
Create a binary representation of a tag 3 packet
Returns:
The Uint8Array representation.
- Type
- Uint8Array