Implementation of the Key Material Packet (Tag 5,6,7,14)
RFC4480 5.5: A key material packet contains all the information about a public or private key. There are four variants of this packet type, and two major versions. Consequently, this section is complex.
RFC4480 5.5: A key material packet contains all the information about a public or private key. There are four variants of this packet type, and two major versions. Consequently, this section is complex.
new (require("packet/public_key"))()
- Source:
- Source:
Requires
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:
Methods
-
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
-
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
-
readPublicKey()
-
Alias of read()
- Source:
- See:
-
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:
-
writePublicKey()
-
Alias of write()
- Source:
- See: