Module: encoding/armor

Requires

Methods

(static) armor(messagetype, body, partindex, parttotal, customComment) → {String|ReadableStream.<String>}

Armor an OpenPGP binary packet block

Parameters:
Name Type Description
messagetype Integer

type of the message

body
partindex Integer
parttotal Integer
customComment String

(optional) additional comment to add to the armored string

Source:
Returns:

Armored text

Type
String | ReadableStream.<String>

(async, static) dearmor(text) → {Promise.<Object>}

DeArmor an OpenPGP armored message; verify the checksum and return the encoded bytes

Parameters:
Name Type Description
text String

OpenPGP armored message

Source:
Returns:

An object with attribute "text" containing the message text, an attribute "data" containing a stream of bytes and "type" for the ASCII armor type

Type
Promise.<Object>

(inner) addheader(customComment) → {String}

Add additional information to the armor version of an OpenPGP binary packet block.

Parameters:
Name Type Description
customComment String

(optional) additional comment to add to the armored string

Version:
  • 2011-12-16
Author:
  • Alex
Source:
Returns:

The header information

Type
String

(inner) createcrc24(data) → {Uint8Array|ReadableStream.<Uint8Array>}

Internal function to calculate a CRC-24 checksum over a given string (data)

Parameters:
Name Type Description
data String | ReadableStream.<String>

Data to create a CRC-24 checksum for

Source:
Returns:

The CRC-24 checksum

Type
Uint8Array | ReadableStream.<Uint8Array>

(inner) getCheckSum(data) → {String|ReadableStream.<String>}

Calculates a checksum over the given data and returns it base64 encoded

Parameters:
Name Type Description
data String | ReadableStream.<String>

Data to create a CRC-24 checksum for

Source:
Returns:

Base64 encoded checksum

Type
String | ReadableStream.<String>