Class: CleartextMessage

cleartext~ CleartextMessage

Class that represents an OpenPGP cleartext signed message. See http://tools.ietf.org/html/rfc4880#section-7

new CleartextMessage(text, packetlist)

Parameters:
Name Type Description
text String The cleartext of the signed message
packetlist module:packet/packetlist The packetlist with signature packets or undefined if message not yet signed
Source:

Methods

armor() → {String}

Returns ASCII armored text of cleartext signed message
Source:
Returns:
ASCII armor
Type
String

getSigningKeyIds() → {Array.<module:type/keyid>}

Returns the key IDs of the keys that signed the cleartext message
Source:
Returns:
array of keyid objects
Type
Array.<module:type/keyid>

getText() → {String}

Get cleartext
Source:
Returns:
cleartext of message
Type
String

sign(privateKeys)

Sign the cleartext message
Parameters:
Name Type Description
privateKeys Array.<module:key~Key> private keys with decrypted secret key data for signing
Source:

verify(publicKeys) → {Array.<{keyid: module:type/keyid, valid: Boolean}>}

Verify signatures of cleartext signed message
Parameters:
Name Type Description
publicKeys Array.<module:key~Key> public keys to verify signatures
Source:
Returns:
list of signer's keyid and validity of signature
Type
Array.<{keyid: module:type/keyid, valid: Boolean}>