Class: SymEncryptedSessionKey

packet.SymEncryptedSessionKey()

new SymEncryptedSessionKey()

Public-Key Encrypted Session Key Packets (Tag 1)

RFC4880 5.1: A Public-Key Encrypted Session Key packet holds the 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, which holds an encrypted message. The message is encrypted with the session key, and the session key is itself encrypted and stored in the Encrypted Session Key packet(s). The Symmetrically Encrypted Data Packet is preceded by one Public-Key Encrypted Session Key packet for each OpenPGP key to which the message is encrypted. The recipient of the message finds a session key that is encrypted to their public key, decrypts the session key, and then uses the session key to decrypt the message.

Source:

Methods

(async) decrypt(passphrase) → {Promise.<Boolean>}

Decrypts the session key

Parameters:
Name Type Description
passphrase String

The passphrase in string form

Source:
Returns:
Type
Promise.<Boolean>

(async) encrypt(passphrase) → {Promise.<Boolean>}

Encrypts the session key

Parameters:
Name Type Description
passphrase String

The passphrase in string form

Source:
Returns:
Type
Promise.<Boolean>

postCloneTypeFix()

Fix custom types after cloning

Source:

read(input, position, len) → {module:packet.SymEncryptedSessionKey}

Parsing function for a symmetric encrypted session key packet (tag 3).

Parameters:
Name Type Description
input Uint8Array

Payload of a tag 1 packet

position Integer

Position to start reading from the input string

len Integer

Length of the packet or the remaining length of input at position

Source:
Returns:

Object representation

Type
module:packet.SymEncryptedSessionKey