-
<inner> decryptSecretMPIs(str_passphrase) → {Boolean}
-
Decrypts the private key MPIs which are needed to use the key.
openpgp_packet_keymaterial.hasUnencryptedSecretKeyData should be
false otherwise
a call to this function is not needed
Parameters:
Name |
Type |
Description |
str_passphrase |
String
|
The passphrase for this private key
as string |
- Source:
Returns:
True if the passphrase was correct; false if not
-
Type
-
Boolean
-
<inner> getFingerprint() → {String}
-
Calculates the fingerprint of the key
- Source:
Returns:
A string containing the fingerprint
-
Type
-
String
-
<inner> getKeyId() → {String}
-
Calculates the key id of they key
- Source:
Returns:
A 8 byte key id
-
Type
-
String
-
<inner> read_nodes(parent_node, input, position, len) → {Integer}
-
Continue parsing packets belonging to the key material such as signatures
Parameters:
Name |
Type |
Description |
parent_node |
Object
|
The parent object |
input |
String
|
Input string to read the packet(s) from |
position |
Integer
|
Start position for the parser |
len |
Integer
|
Length of the packet(s) or remaining length of input |
- Source:
Returns:
Length of nodes read
-
Type
-
Integer
-
<inner> read_priv_key(input, position, len) → {Object}
-
Internal parser for private keys as specified in RFC 4880 section 5.5.3
Parameters:
Name |
Type |
Description |
input |
String
|
Input string to read the packet from |
position |
Integer
|
Start position for the parser |
len |
Integer
|
Length of the packet or remaining length of input |
- Source:
Returns:
This object with attributes set by the parser
-
Type
-
Object
-
<inner> read_pub_key(input, position, len) → {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 |
position |
Integer
|
Start position for the parser |
len |
Integer
|
Length of the packet or remaining length of input |
- Source:
Returns:
This object with attributes set by the parser
-
Type
-
Object
-
-
This function reads the payload of a secret key packet (Tag 5)
and initializes the openpgp_packet_keymaterial
Parameters:
Name |
Type |
Description |
input |
String
|
Input string to read the packet from |
position |
Integer
|
Start position for the parser |
len |
Intefer
|
Length of the packet or remaining length of input |
- Source:
Returns:
-
Type
-
openpgp_packet_keymaterial
-
-
This function reads the payload of a public key packet (Tag 6)
and initializes the openpgp_packet_keymaterial
Parameters:
Name |
Type |
Description |
input |
String
|
Input string to read the packet from |
position |
Integer
|
Start position for the parser |
len |
Integer
|
Length of the packet or remaining length of input |
- Source:
Returns:
-
Type
-
openpgp_packet_keymaterial
-
-
This function reads the payload of a secret key sub packet (Tag 7)
and initializes the openpgp_packet_keymaterial
Parameters:
Name |
Type |
Description |
input |
String
|
Input string to read the packet from |
position |
Integer
|
Start position for the parser |
len |
Integer
|
Length of the packet or remaining length of input |
- Source:
Returns:
-
Type
-
openpgp_packet_keymaterial
-
-
This function reads the payload of a public key sub packet (Tag 14)
and initializes the openpgp_packet_keymaterial
Parameters:
Name |
Type |
Description |
input |
String
|
Input string to read the packet from |
position |
Integer
|
Start position for the parser |
len |
Integer
|
Length of the packet or remaining length of input |
- Source:
Returns:
-
Type
-
openpgp_packet_keymaterial
-
<inner> toString()
-
Generates Debug output
- Source:
Returns:
String which gives some information about the keymaterial
-
<inner> verifyKey() → {Integer}
-
Checks the validity for usage of this (sub)key
- Source:
Returns:
0 = bad key, 1 = expired, 2 = revoked, 3 = valid
-
Type
-
Integer