Module: packet/packetlist

packet/packetlist

new require("packet/packetlist")()

Source:
Source:

Members

<readonly> length :Integer

The number of packets contained within the list.
Type:
  • Integer
Source:

Methods

filter()

Creates a new packetList with all packets that pass the test implemented by the provided function.
Source:

filterByTag()

Creates a new packetList with all packets from the given types
Source:

findPacket(type) → {packet|null}

Traverses packet tree and returns first matching packet
Parameters:
Name Type Description
type enums.packet The packet type
Source:
Returns:
Type
packet | null

forEach()

Executes the provided callback once for each element
Source:

push()

Adds a packet to the list. This is the only supported method of doing so; writing to packetlist[i] directly will result in an error.
Source:

read(An)

Reads a stream of binary data and interprents it as a list of packets.
Parameters:
Name Type Description
An openpgp_byte_array array of bytes.
Source:

write() → {openpgp_byte_array}

Creates a binary representation of openpgp objects contained within the class instance.
Source:
Returns:
An array of bytes containing valid openpgp packets.
Type
openpgp_byte_array