Class: _openpgp_packet

_openpgp_packet

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

new _openpgp_packet

Source:
  • openpgp.js, line 2108

Methods

<inner> encode_length

Encodes a given integer of length to the openpgp length specifier to a string
Parameters:
Name Type Description
length Integer of the length to encode
Source:
  • openpgp.js, line 2116
Returns:
string with openpgp length representation
Type
string

<inner> read_packet

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:
  • openpgp.js, line 2190
Returns:
returns a parsed openpgp_packet
Type
openpgp_packet_*

<inner> write_old_packet_header

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:
  • openpgp.js, line 2162
Returns:
string of the header
Type
string

<inner> write_packet_header

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:
  • openpgp.js, line 2146
Returns:
string of the header
Type
string