Methods
getAlgorithmInfo() → {Object}
Returns algorithm information
- Overrides:
- Source:
Returns:
An object of the form {algorithm: String, bits:int, curve:String}.
- Type
- Object
getAlgorithmInfo() → {Object}
Returns algorithm information
- Overrides:
- Source:
Returns:
An object of the form {algorithm: String, bits:int, curve:String}.
- Type
- Object
getCreationTime() → {Date}
Returns the creation time of the key
- Overrides:
- Source:
Returns:
- Type
- Date
getCreationTime() → {Date}
Returns the creation time of the key
- Overrides:
- Source:
Returns:
- Type
- Date
(async) getExpirationTime(primaryKey, date, configopt) → {Date|Infinity|null}
Returns the expiration time of the subkey or Infinity if key does not expire Returns null if the subkey is invalid.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
primaryKey |
SecretKeyPacket | PublicKeyPacket | The primary key packet |
|
date |
Date | Use the given date instead of the current time |
|
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
- Source:
Returns:
- Type
- Date | Infinity | null
getFingerprint() → {String}
Calculates the fingerprint of the key
- Overrides:
- Source:
Returns:
A string containing the fingerprint in lowercase hex.
- Type
- String
getFingerprint() → {String}
Calculates the fingerprint of the key
- Overrides:
- Source:
Returns:
A string containing the fingerprint in lowercase hex.
- Type
- String
getKeyId() → {module:type/keyid~Keyid}
Calculates the key id of the key
- Overrides:
- Source:
Returns:
A 8 byte key id.
getKeyId() → {module:type/keyid~Keyid}
Calculates the key id of the key
- Overrides:
- Source:
Returns:
A 8 byte key id.
hasSameFingerprintAs() → {Boolean}
Calculates whether two keys have the same fingerprint without actually calculating the fingerprint
- Overrides:
- Source:
Returns:
Whether the two keys have the same version and public key data.
- Type
- Boolean
hasSameFingerprintAs() → {Boolean}
Calculates whether two keys have the same fingerprint without actually calculating the fingerprint
- Overrides:
- Source:
Returns:
Whether the two keys have the same version and public key data.
- Type
- Boolean
isDecrypted() → {Boolean|null}
Check whether secret-key data is available in decrypted form. Returns null for public keys.
- Overrides:
- Source:
Returns:
- Type
- Boolean | null
isDecrypted() → {Boolean|null}
Check whether secret-key data is available in decrypted form. Returns null for public keys.
- Overrides:
- Source:
Returns:
- Type
- Boolean | null
(async) isRevoked(primaryKey, signature, key,, date, configopt) → {Boolean}
Checks if a binding signature of a subkey is revoked
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
primaryKey |
SecretKeyPacket | PublicKeyPacket | The primary key packet |
|
signature |
SignaturePacket | The binding signature to verify |
|
key, |
PublicSubkeyPacket | SecretSubkeyPacket | PublicKeyPacket | SecretKeyPacket | optional The key to verify the signature |
|
date |
Date | Use the given date instead of the current time |
|
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
- Source:
Returns:
True if the binding signature is revoked.
- Type
- Boolean
(async) revoke(primaryKey, reasonForRevocation, date, configopt) → {SubKey}
Revokes the subkey
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
primaryKey |
SecretKeyPacket | decrypted private primary key for revocation |
||||||||||
reasonForRevocation |
Object | optional, object indicating the reason for revocation Properties
|
||||||||||
date |
Date | optional, override the creationtime of the revocation signature |
||||||||||
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
- Source:
Returns:
New subkey with revocation signature.
- Type
- SubKey
toPacketlist() → {PacketList}
Transforms structured subkey data to packetlist
- Source:
Returns:
- Type
- PacketList
(async) update(subKey, primaryKey, configopt)
Update subkey with new components from specified subkey
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
subKey |
SubKey | Source subkey to merge |
|
primaryKey |
SecretKeyPacket | SecretSubkeyPacket | primary key used for validation |
|
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
- Source:
Throws:
-
if update failed
- Type
- Error
(async) verify(primaryKey, date, configopt) → {SignaturePacket}
Verify subkey. Checks for revocation signatures, expiration time and valid binding signature.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
primaryKey |
SecretKeyPacket | PublicKeyPacket | The primary key packet |
|
date |
Date | Use the given date instead of the current time |
|
config |
Object |
<optional> |
Full configuration, defaults to openpgp.config |
- Source:
Throws:
-
if the subkey is invalid.
- Type
- Error
Returns:
- Type
- SignaturePacket