Class: openpgp_packet_encryptedintegrityprotecteddata

openpgp_packet_encryptedintegrityprotecteddata

Implementation of the Sym. Encrypted Integrity Protected Data Packet (Tag 18) RFC4880 5.13: The Symmetrically Encrypted Integrity Protected Data packet is a variant of the Symmetrically Encrypted Data packet. It is a new feature created for OpenPGP that addresses the problem of detecting a modification to encrypted data. It is used in combination with a Modification Detection Code packet.

new openpgp_packet_encryptedintegrityprotecteddata()

Source:

Methods

<inner> decrypt(symmetric_algorithm_type, key) → {String}

Decrypts the encrypted data contained in this object read_packet must have been called before
Parameters:
Name Type Description
symmetric_algorithm_type Integer The selected symmetric encryption algorithm to be used
key String The key of cipher blocksize length to be used
Source:
Returns:
The decrypted data of this packet
Type
String

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

Parsing function for the packet.
Parameters:
Name Type Description
input String Payload of a tag 18 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_encryptedintegrityprotecteddata

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

Creates a string representation of a Sym. Encrypted Integrity Protected Data Packet (tag 18) (see RFC4880 5.13)
Parameters:
Name Type Description
symmetric_algorithm Integer The selected symmetric encryption algorithm to be used
key String The key of cipher blocksize length to be used
data String Plaintext data to be encrypted within the packet
Source:
Returns:
A string representation of the packet
Type
String