Class: openpgp_packet_encrypteddata

openpgp_packet_encrypteddata

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

new openpgp_packet_encrypteddata

Source:
  • openpgp.js, line 1860

Methods

<inner> decrypt_sym

symmetrically decrypt the packet data
Parameters:
Name Type Description
symmetric_algorithm_type integer symmetric key algorithm to use // See RFC4880 9.2
key String key as string with the corresponding length to the algorithm
Source:
  • openpgp.js, line 1894
Returns:
the decrypted data;

<inner> read_packet

parsing function for the packet.
Parameters:
Name Type Description
input string payload of a tag 9 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:
  • openpgp.js, line 1875
Returns:
object representation
Type
openpgp_packet_encrypteddata

<inner> write_packet

Creates a string representation of the packet
Parameters:
Name Type Description
algo Integer symmetric key algorithm to use // See RFC4880 9.2
key String key as string with the corresponding length to the algorithm
data String data to be
Source:
  • openpgp.js, line 1911
Returns:
string-representation of the packet
Type
String