GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Home
  • armor
  • config
  • enums
  • AEADEncryptedDataPacket
  • CleartextMessage
  • CompressedDataPacket
  • Key
  • LiteralDataPacket
  • MarkerPacket
  • Message
  • OnePassSignaturePacket
  • PacketList
  • PaddingPacket

This view

  • Original page
  • New address

GeezerVison is showing docs.openpgpjs.org — JSDoc: Class: PacketList

Constructor

new PacketList()

Source:
  • packet/packetlist.js, line 46

Extends

  • Array

Methods

filterByTag(…tags) → {PacketList}

Creates a new PacketList with all packets matching the given tag(s)

Parameters:
Name Type Attributes Description
tags module:enums.packet <repeatable>

packet tags to look for

Source:
  • packet/packetlist.js, line 278
Returns:
Type
PacketList

findPacket(tag) → {Packet|undefined}

Traverses packet list and returns first packet with matching tag

Parameters:
Name Type Description
tag module:enums.packet

The packet tag

Source:
  • packet/packetlist.js, line 297
Returns:
Type
Packet | undefined

indexOfTag(…tags) → {Array.<Integer>}

Find indices of packets with the given tag(s)

Parameters:
Name Type Attributes Description
tags module:enums.packet <repeatable>

packet tags to look for

Source:
  • packet/packetlist.js, line 306
Returns:

packet indices

Type
Array.<Integer>

(async) read(bytes, allowedPackets, configopt, grammarValidatoropt, delayErrorsopt)

Reads a stream of binary data and interprets it as a list of packets.

Parameters:
Name Type Attributes Default Description
bytes Uint8Array | ReadableStream.<Uint8Array>

binary data to parse

allowedPackets Object

mapping where keys are allowed packet tags, pointing to their Packet class

config Object <optional>

full configuration, defaults to openpgp.config

grammarValidator function <optional>
null
delayErrors Boolean <optional>
false

delay errors until the input stream has been read completely

Source:
  • packet/packetlist.js, line 75
Throws:

on parsing errors

write() → {Uint8Array}

Creates a binary representation of openpgp objects contained within the class instance.

Source:
  • packet/packetlist.js, line 234
Returns:

A Uint8Array containing valid openpgp packets.

Type
Uint8Array

(async, static) fromBinary(bytes, allowedPackets, configopt, grammarValidatoropt, delayErrorsopt) → {Promise.<PacketList>}

Parses the given binary data and returns a list of packets. Equivalent to calling read on an empty PacketList instance.

Parameters:
Name Type Attributes Default Description
bytes Uint8Array | ReadableStream.<Uint8Array>

binary data to parse

allowedPackets Object

mapping where keys are allowed packet tags, pointing to their Packet class

config Object <optional>

full configuration, defaults to openpgp.config

grammarValidator function <optional>
null
delayErrors Boolean <optional>
false

delay errors until the input stream has been read completely

Source:
  • packet/packetlist.js, line 59
Throws:

on parsing errors

Returns:

parsed list of packets

Type
Promise.<PacketList>
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.