Class: openpgp_packet_literaldata

openpgp_packet_literaldata

Implementation of the Literal Data Packet (Tag 11) RFC4880 5.9: A Literal Data packet contains the body of a message; data that is not to be further interpreted.

new openpgp_packet_literaldata()

Source:

Members

<static, readonly> formats :String

Data types in the literal packet
Properties:
Name Type Default Description
binary String b Binary data
text String t Text data
utf8 String u Utf8 data
Source:

Methods

get_data_bytes() → {String}

Get the byte sequence representing the literal packet data
Source:
Returns:
A sequence of bytes
Type
String

read_packet(input, position, len) → {openpgp_packet_encrypteddata}

Parsing function for a literal data packet (tag 11).
Parameters:
Name Type Description
input String Payload of a tag 11 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

set_data(str, format)

Set the packet data to a javascript native string or a squence of bytes. Conversion to a proper utf8 encoding takes place when the packet is written.
Parameters:
Name Type Description
str String Any native javascript string
format openpgp_packet_literaldata.formats
Source:

set_data_bytes(bytes, format)

Set the packet data to value represented by the provided string of bytes together with the appropriate conversion format.
Parameters:
Name Type Description
bytes String The string of bytes
format openpgp_packet_literaldata.formats
Source:

toString() → {String}

Generates debug output (pretty print)
Source:
Returns:
String which gives some information about the keymaterial
Type
String

write_packet(data) → {String}

Creates a string representation of the packet
Parameters:
Name Type Description
data String The data to be inserted as body
Source:
Returns:
string-representation of the packet
Type
String