Class: SubKey

key~SubKey

Class that represents a subkey packet and the relevant signatures.

Constructor

new SubKey()

Source:

Methods

getExpirationTime() → {Date|null}

Returns the expiration time of the subkey or null if key does not expire
Source:
Returns:
Type
Date | null

isValidEncryptionKey(primaryKey) → {Boolean}

Returns true if the subkey can be used for encryption
Parameters:
Name Type Description
primaryKey module:packet/secret_key | module:packet/public_key The primary key packet
Source:
Returns:
Type
Boolean

isValidSigningKey(primaryKey) → {Boolean}

Returns true if the subkey can be used for signing of data
Parameters:
Name Type Description
primaryKey module:packet/secret_key | module:packet/public_key The primary key packet
Source:
Returns:
Type
Boolean

toPacketlist() → {module:packet/packetlist}

Transforms structured subkey data to packetlist
Source:
Returns:
Type
module:packet/packetlist

update(subKey, primaryKey)

Update subkey with new components from specified subkey
Parameters:
Name Type Description
subKey module:key~SubKey source subkey to merge
primaryKey module:packet/signature primary key used for validation
Source:

verify() → {module:enums.keyStatus}

Verify subkey. Checks for revocation signatures, expiration time and valid binding signature
Source:
Returns:
The status of the subkey
Type
module:enums.keyStatus