Class: _openpgp_packet

_openpgp_packet

Parent openpgp packet class. Operations focus on determining packet types and packet header.

new _openpgp_packet()

Source:

Methods

<inner> encode_length(length) → {String}

Encodes a given integer of length to the openpgp length specifier to a string
Parameters:
Name Type Description
length Integer The length to encode
Source:
Returns:
String with openpgp length representation
Type
String

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

Generic static Packet Parser function
Parameters:
Name Type Description
input String Input stream as string
position integer Position to start parsing
len integer Length of the input from position on
Source:
Returns:
Returns a parsed openpgp_packet
Type
Object

<inner> write_old_packet_header(tag_type, length) → {String}

Writes a packet header Version 3 with the given tag_type and length to a string
Parameters:
Name Type Description
tag_type Integer Tag type
length Integer Length of the payload
Source:
Returns:
String of the header
Type
String

<inner> write_packet_header(tag_type, length) → {String}

Writes a packet header version 4 with the given tag_type and length to a string
Parameters:
Name Type Description
tag_type Integer Tag type
length Integer Length of the payload
Source:
Returns:
String of the header
Type
String