Class: PublicKey

packet/public_key~ PublicKey

new PublicKey()

Source:

Members

algorithm :module:enums.publicKey

Public key algorithm
Type:
Source:

created :Date

Key creation date.
Type:
  • Date
Source:

mpi :module:type/mpi

A list of multiprecision integers
Type:
Source:

readPublicKey

Alias of read()
Source:
See:

writePublicKey

Alias of write()
Source:
See:

Methods

getBitSize() → {int}

Returns bit size of key
Source:
Returns:
Number of bits
Type
int

getFingerprint() → {String}

Calculates the fingerprint of the key
Source:
Returns:
A string containing the fingerprint
Type
String

getKeyId() → {String}

Calculates the key id of the key
Source:
Returns:
A 8 byte key id
Type
String

postCloneTypeFix()

Fix custom types after cloning
Source:

read(input) → {Object}

Internal Parser for public keys as specified in RFC 4880 section 5.5.2 Public-Key Packet Formats called by read_tag<num>
Parameters:
Name Type Description
input String Input string to read the packet from
Source:
Returns:
This object with attributes set by the parser
Type
Object

write() → {Object}

Same as write_private_key, but has less information because of public key.
Source:
Returns:
{body: [string]OpenPGP packet body contents, header: [string] OpenPGP packet header, string: [string] header+body}
Type
Object

writeOld()

Write an old version packet - it's used by some of the internal routines.
Source: