Class: SymmetricallyEncrypted

packet.SymmetricallyEncrypted()

new SymmetricallyEncrypted()

Implementation of the Symmetrically Encrypted Data Packet (Tag 9)

RFC4880 5.7: The Symmetrically Encrypted Data packet contains data encrypted with a symmetric-key algorithm. When it has been decrypted, it contains other packets (usually a literal data packet or compressed data packet, but in theory other Symmetrically Encrypted Data packets or sequences of packets that form whole OpenPGP messages).

Source:

Members

encrypted

Encrypted secret-key data

Source:

ignore_mdc_error

When true, decrypt fails if message is not integrity protected

Source:
See:

packets :module:packet.List

Decrypted packets contained within.

Type:
Source:

tag :module:enums.packet

Packet type

Type:
Source:

Methods

(async) decrypt(sessionKeyAlgorithm, key) → {Promise.<Boolean>}

Decrypt the symmetrically-encrypted packet data See RFC 4880 9.2 for algorithms.

Parameters:
Name Type Description
sessionKeyAlgorithm module:enums.symmetric

Symmetric key algorithm to use

key Uint8Array

The key of cipher blocksize length to be used

Source:
Returns:
Type
Promise.<Boolean>

(async) encrypt(sessionKeyAlgorithm, key) → {Promise.<Boolean>}

Encrypt the symmetrically-encrypted packet data See RFC 4880 9.2 for algorithms.

Parameters:
Name Type Description
sessionKeyAlgorithm module:enums.symmetric

Symmetric key algorithm to use

key Uint8Array

The key of cipher blocksize length to be used

Source:
Returns:
Type
Promise.<Boolean>