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:

Methods

<inner> decrypt_sym(symmetric_algorithm_type, key)

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:
Returns:
The decrypted data;

<inner> read_packet(input, position, len) → {openpgp_packet_encrypteddata}

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:
Returns:
Object representation
Type
openpgp_packet_encrypteddata

<inner> write_packet(algo, key, data) → {String}

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:
Returns:
String-representation of the packet
Type
String