Class: SymmetricallyEncryptedDataPacket

SymmetricallyEncryptedDataPacket()

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).

Constructor

new SymmetricallyEncryptedDataPacket()

Source:

Members

encrypted

Encrypted secret-key data

Source:

packets :PacketList

Decrypted packets contained within.

Type:
Source:

Methods

(async) decrypt(sessionKeyAlgorithm, key, configopt)

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

Parameters:
Name Type Attributes Description
sessionKeyAlgorithm module:enums.symmetric

Symmetric key algorithm to use

key Uint8Array

The key of cipher blocksize length to be used

config Object <optional>

Full configuration, defaults to openpgp.config

Source:
Throws:

if decryption was not successful

Type
Error

(async) encrypt(sessionKeyAlgorithm, key, configopt)

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

Parameters:
Name Type Attributes Description
sessionKeyAlgorithm module:enums.symmetric

Symmetric key algorithm to use

key Uint8Array

The key of cipher blocksize length to be used

config Object <optional>

Full configuration, defaults to openpgp.config

Source:
Throws:

if encryption was not successful

Type
Error