Class: SymEncryptedSessionKeyPacket

SymEncryptedSessionKeyPacket(configopt)

Symmetric-Key Encrypted Session Key Packets (Tag 3)

RFC4880 5.3: The Symmetric-Key Encrypted Session Key packet holds the symmetric-key encryption of a session key used to encrypt a message. Zero or more Public-Key Encrypted Session Key packets and/or Symmetric-Key Encrypted Session Key packets may precede a Symmetrically Encrypted Data packet that holds an encrypted message. The message is encrypted with a session key, and the session key is itself encrypted and stored in the Encrypted Session Key packet or the Symmetric-Key Encrypted Session Key packet.

Constructor

new SymEncryptedSessionKeyPacket(configopt)

Parameters:
Name Type Attributes Description
config Object <optional>

Full configuration, defaults to openpgp.config

Source:

Methods

(async) decrypt(passphrase)

Decrypts the session key

Parameters:
Name Type Description
passphrase String

The passphrase in string form

Source:
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

Source:
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

Source:

write() → {Uint8Array}

Create a binary representation of a tag 3 packet

Source:
Returns:

The Uint8Array representation.

Type
Uint8Array