Constructor
new SymEncryptedSessionKeyPacket(config)
Parameters:
Name | Type | Description |
---|---|---|
config |
Object | (optional) full configuration, defaults to openpgp.config |
Methods
(async) decrypt(passphrase)
Decrypts the session key
Parameters:
Name | Type | Description |
---|---|---|
passphrase |
String | The passphrase in string form |
Throws:
-
if decryption was not successful
- Type
- Error
(async) encrypt(passphrase, config)
Encrypts the session key
Parameters:
Name | Type | 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