Constructor
new SymEncryptedSessionKeyPacket(configopt)
Parameters:
Name | Type | Attributes | 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, configopt)
Encrypts the session key
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