-
<inner> decryptAndVerifyMessage(privateKey, publicKeys, message) → {Object}
-
Decrypts message and verifies signatures
Parameters:
Name |
Type |
Description |
privateKey |
Key
|
private key with decrypted secret key data |
publicKeys |
Array.<Key>
|
public keys to verify signatures |
message |
Message
|
the message object with signed and encrypted data |
- Source:
Returns:
decrypted message as as native JavaScript string
with verified signatures or null if no literal data found
-
Type
-
Object
-
<inner> decryptMessage(privateKey, message) → {String|null}
-
Decrypts message
Parameters:
Name |
Type |
Description |
privateKey |
Key
|
private key with decrypted secret key data |
message |
Message
|
the message object with the encrypted data |
- Source:
Returns:
decrypted message as as native JavaScript string
or null if no literal data found
-
Type
-
String
|
null
-
<inner> encryptMessage(keys, text) → {String}
-
Encrypts message text with keys
Parameters:
Name |
Type |
Description |
keys |
Array.<Key>
|
array of keys, used to encrypt the message |
text |
String
|
message as native JavaScript string |
- Source:
Returns:
encrypted ASCII armored message
-
Type
-
String
-
<inner> generateKeyPair(keyType, numBits, userId, passphrase) → {Object}
-
Generates a new OpenPGP key pair. 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. (should be 1024+, generally) |
userId |
String
|
assumes already in form of "User Name " |
passphrase |
String
|
The passphrase used to encrypt the resulting private key |
- Source:
Returns:
{key: Array, privateKeyArmored: Array, publicKeyArmored: Array}
-
Type
-
Object
-
<inner> signAndEncryptMessage(publicKeys, privateKey, text) → {String}
-
Signs message text and encrypts it
Parameters:
Name |
Type |
Description |
publicKeys |
Array.<Key>
|
array of keys, used to encrypt the message |
privateKey |
Key
|
private key with decrypted secret key data for signing |
text |
String
|
message as native JavaScript string |
- Source:
Returns:
encrypted ASCII armored message
-
Type
-
String
-
<inner> signClearMessage(privateKeys, text) → {String}
-
Signs a cleartext message
Parameters:
Name |
Type |
Description |
privateKeys |
Array.<Key>
|
private key with decrypted secret key data to sign cleartext |
text |
String
|
cleartext |
- Source:
Returns:
ASCII armored message
-
Type
-
String
-
<inner> verifyClearSignedMessage(publicKeys, message) → {Object}
-
Verifies signatures of cleartext signed message
Parameters:
Name |
Type |
Description |
publicKeys |
Array.<Key>
|
public keys to verify signatures |
message |
CleartextMessage
|
cleartext message object with signatures |
- Source:
Returns:
cleartext with status of verified signatures
-
Type
-
Object