Class: PublicSubkey

packet.PublicSubkey()

new PublicSubkey()

A Public-Subkey packet (tag 14) has exactly the same format as a Public-Key packet, but denotes a subkey. One or more subkeys may be associated with a top-level key. By convention, the top-level key provides signature services, and the subkeys provide encryption services.

Source:

Extends

Members

created :Date

Key creation date.

Type:
  • Date
Inherited From:
Source:

expirationTimeV3 :Integer

Time until expiration in days (V3 only)

Type:
  • Integer
Inherited From:
Source:

fingerprint :String

Fingerprint in lowercase hex

Type:
  • String
Inherited From:
Source:

keyid :module:type/keyid

Keyid

Type:
Inherited From:
Source:

params :Array.<Object>

Algorithm specific params

Type:
  • Array.<Object>
Inherited From:
Source:

readPublicKey

Alias of read()

Inherited From:
Source:
See:

tag :module:enums.packet

Packet type

Type:
Overrides:
Source:

version :Integer

Packet version

Type:
  • Integer
Inherited From:
Source:

writePublicKey

Alias of write()

Inherited From:
Source:
See:

Methods

getAlgorithmInfo() → {Object}

Returns algorithm information

Inherited From:
Source:
Returns:

An object of the form {algorithm: String, bits:int, curve:String}

Type
Object

getCreationTime() → {Date}

Returns the creation time of the key

Inherited From:
Source:
Returns:
Type
Date

getFingerprint() → {String}

Calculates the fingerprint of the key

Inherited From:
Source:
Returns:

A string containing the fingerprint in lowercase hex

Type
String

getFingerprintBytes() → {Uint8Array}

Calculates the fingerprint of the key

Inherited From:
Source:
Returns:

A Uint8Array containing the fingerprint

Type
Uint8Array

getKeyId() → {String}

Calculates the key id of the key

Inherited From:
Source:
Returns:

A 8 byte key id

Type
String

isDecrypted() → {Boolean|null}

Check whether secret-key data is available in decrypted form. Returns null for public keys.

Inherited From:
Source:
Returns:
Type
Boolean | null

postCloneTypeFix()

Fix custom types after cloning

Inherited From:
Source:

read(bytes) → {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
bytes Uint8Array

Input array to read the packet from

Inherited From:
Source:
Returns:

This object with attributes set by the parser

Type
Object

write() → {Uint8Array}

Same as write_private_key, but has less information because of public key.

Inherited From:
Source:
Returns:

OpenPGP packet body contents,

Type
Uint8Array

writeOld()

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

Inherited From:
Source: