Module: packet/packet

Requires

Methods

(static) read(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 module:packet/packet
Type
Object

(static) writeHeader(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

(static) writeOldHeader(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

(static) writeSimpleLength(length) → {Uint8Array}

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
Uint8Array