Module: key

key

Source:

Classes

Key

Methods

<inner> generate(keyType, numBits, userId, passphrase) → {Key}

Generates a new OpenPGP key. Currently only supports RSA keys. Primary and subkey will be of same type.
Parameters:
Name Type Description
keyType Integer to indicate what type of key to make. RSA is 1. See http://tools.ietf.org/html/rfc4880#section-9.1
numBits Integer number of bits for the key creation.
userId String assumes already in form of "User Name "
passphrase String The passphrase used to encrypt the resulting private key
Source:
Returns:
Type
Key

<inner> readArmored(armoredText) → {Key}

Reads an OpenPGP armored text and returns a key object
Parameters:
Name Type Description
armoredText String text to be parsed
Source:
Returns:
new key object
Type
Key