Class: SecretKey

packet/secret_key~ SecretKey

new SecretKey()

Source:

Extends

Methods

decrypt(str_passphrase) → {Boolean}

Decrypts the private key MPIs which are needed to use the key.
Parameters:
Name Type Description
str_passphrase String The passphrase for this private key as string
Source:
Returns:
True if the passphrase was correct or MPI already decrypted; false if not
Type
Boolean

encrypt(passphrase)

Encrypt the payload. By default, we use aes256 and iterated, salted string to key specifier
Parameters:
Name Type Description
passphrase String
Source:

read(bytes)

Internal parser for private keys as specified in RFC 4880 section 5.5.3
Parameters:
Name Type Description
bytes String Input string to read the packet from
Source:

write() → {String}

Creates an OpenPGP key packet for the given key.
Source:
Returns:
A string of bytes containing the secret key OpenPGP packet
Type
String