diff --git a/doc/openpgp_keyring.html b/doc/openpgp_keyring.html new file mode 100644 index 00000000..64793a69 --- /dev/null +++ b/doc/openpgp_keyring.html @@ -0,0 +1,1651 @@ + + + + + JSDoc: Class: openpgp_keyring + + + + + + + + + + +
+ +

Class: openpgp_keyring

+ + + + + +
+ +
+

+ openpgp_keyring +

+ +
The class that deals with storage of the keyring. Currently the only option is to use HTML5 local storage.
+ +
+ +
+
+ + + + +
+

new openpgp_keyring

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12660
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> exportPrivateKey

+ + +
+
+ + +
+ returns the openpgp_msg_privatekey representation of the private key at private key ring index +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
index + + Integer + + + the index of the private key within the privateKeys array
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12876
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ the private key object +
+ + + + +
+
+ Type +
+
+ + openpgp_msg_privatekey + +
+
+ + + + +
+ + + +
+

<inner> exportPublicKey

+ + +
+
+ + +
+ returns the openpgp_msg_privatekey representation of the public key at public key ring index +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
index + + Integer + + + the index of the public key within the publicKeys array
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12853
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ the public key object +
+ + + + +
+
+ Type +
+
+ + openpgp_msg_privatekey + +
+
+ + + + +
+ + + +
+

<inner> getPrivateKeyForAddress

+ + +
+
+ + +
+ Searches the keyring for a private key containing the specified email address +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
email_address + + String + + + email address to search for
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12757
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ private keys found +
+ + + + +
+
+ Type +
+
+ + Array[openpgp_msg_privatekey + +
+
+ + + + +
+ + + +
+

<inner> getPrivateKeyForKeyId

+ + +
+
+ + +
+ Searches the keyring for private keys having the specified key id +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
keyId + + String + + + 8 bytes as string containing the key id to look for
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12799
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ private keys found +
+ + + + +
+
+ Type +
+
+ + Array[openpgp_msg_privatekey] + +
+
+ + + + +
+ + + +
+

<inner> getPublicKeyForAddress

+ + +
+
+ + +
+ searches all public keys in the keyring matching the address or address part of the user ids +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
email_address + +
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12729
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ the public keys associated with provided email address. +
+ + + + +
+
+ Type +
+
+ + array[openpgp_msg_publickey] + +
+
+ + + + +
+ + + +
+

<inner> getPublicKeysForKeyId

+ + +
+
+ + +
+ Searches the keyring for public keys having the specified key id +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
keyId + + provided as string of hex number (lowercase)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12785
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ public keys found +
+ + + + +
+
+ Type +
+
+ + Array[openpgp_msg_privatekey] + +
+
+ + + + +
+ + + +
+

<inner> hasPrivateKey

+ + +
+
+ + +
+ Checks if at least one private key is in the keyring +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12701
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ True if there are private keys, else false. +
+ + + + +
+
+ Type +
+
+ + boolean + +
+
+ + + + +
+ + + +
+

<inner> importPrivateKey

+ + +
+
+ + +
+ Imports a private key from an exported ascii armored message +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
armored_text + + String + + + PRIVATE KEY BLOCK message to read the private key from
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12835
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ nothing +
+ + + + +
+
+ Type +
+
+ + null + +
+
+ + + + +
+ + + +
+

<inner> importPublicKey

+ + +
+
+ + +
+ Imports a public key from an exported ascii armored message +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
armored_text + + String + + + PUBLIC KEY BLOCK message to read the public key from
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12822
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ nothing +
+ + + + +
+
+ Type +
+
+ + null + +
+
+ + + + +
+ + + +
+

<inner> init

+ + +
+
+ + +
+ Initialization routine for the keyring. This method reads the +keyring from HTML5 local storage and initializes this instance. +This method is called by openpgp.init(). +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12668
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ undefined +
+ + + + +
+
+ Type +
+
+ + null + +
+
+ + + + +
+ + + +
+

<inner> removePrivateKey

+ + +
+
+ + +
+ Removes a private key from the private key keyring at the specified index +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
index + + Integer + + + the index of the private key within the privateKeys array
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12886
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ The private key object which has been removed +
+ + + + +
+
+ Type +
+
+ + openpgp_msg_privatekey + +
+
+ + + + +
+ + + +
+

<inner> removePublicKey

+ + +
+
+ + +
+ Removes a public key from the public key keyring at the specified index +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
index + + Integer + + + the index of the public key within the publicKeys array
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12864
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ The public key object which has been removed +
+ + + + +
+
+ Type +
+
+ + openpgp_msg_privatekey + +
+
+ + + + +
+ + + +
+

<inner> store

+ + +
+
+ + +
+ Saves the current state of the keyring to HTML5 local storage. +The privateKeys array and publicKeys array gets Stringified using JSON +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12711
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ undefined +
+ + + + +
+
+ Type +
+
+ + null + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_msg_message.html b/doc/openpgp_msg_message.html new file mode 100644 index 00000000..388acfba --- /dev/null +++ b/doc/openpgp_msg_message.html @@ -0,0 +1,587 @@ + + + + + JSDoc: Class: openpgp_msg_message + + + + + + + + + + +
+ +

Class: openpgp_msg_message

+ + + + + +
+ +
+

+ openpgp_msg_message +

+ +
Top-level message object. Contains information from one or more packets
+ +
+ +
+
+ + + + +
+

<protected> new openpgp_msg_message

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12199
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> decrypt

+ + +
+
+ + +
+ Decrypts a message and generates user interface message out of the found. +MDC will be verified as well as message signatures +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
private_key + + openpgp_msg_privatekey + + + the private the message is encrypted with (corresponding to the session key)
sessionkey + + openpgp_packet_encryptedsessionkey + + + the session key to be used to decrypt the message
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12214
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ plaintext of the message or null on error +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ + + +
+

<inner> decryptAndVerifySignature

+ + +
+
+ + +
+ Decrypts a message and generates user interface message out of the found. +MDC will be verified as well as message signatures +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
private_key + + openpgp_msg_privatekey + + + the private the message is encrypted with (corresponding to the session key)
sessionkey + + openpgp_packet_encryptedsessionkey + + + the session key to be used to decrypt the message
pubkey + + openpgp_msg_publickey + + + Array of public keys to check signature against. If not provided, checks local keystore.
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12226
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ plaintext of the message or null on error +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ + + +
+

<inner> verifySignature

+ + +
+
+ + +
+ Verifies a message signature. This function can be called after read_message if the message was signed only. +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
pubkey + + openpgp_msg_publickey + + + Array of public keys to check signature against. If not provided, checks local keystore.
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12285
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ true if the signature was correct; otherwise false +
+ + + + +
+
+ Type +
+
+ + boolean + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_msg_privatekey.html b/doc/openpgp_msg_privatekey.html new file mode 100644 index 00000000..8e62460d --- /dev/null +++ b/doc/openpgp_msg_privatekey.html @@ -0,0 +1,288 @@ + + + + + JSDoc: Class: openpgp_msg_privatekey + + + + + + + + + + +
+ +

Class: openpgp_msg_privatekey

+ + + + + +
+ +
+

+ openpgp_msg_privatekey +

+ +
Class that represents a decoded private key for internal openpgp.js use
+ +
+ +
+
+ + + + +
+

new openpgp_msg_privatekey

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10324
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> extractPublicKey

+ + +
+
+ + +
+ extracts the public key part +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10448
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ OpenPGP armored text containing the public key + returns null if no sufficient data to extract public key +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ + + +
+

<inner> read_nodes

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10336
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ last position +
+ + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp_msg_publickey.html b/doc/openpgp_msg_publickey.html new file mode 100644 index 00000000..7b2b243b --- /dev/null +++ b/doc/openpgp_msg_publickey.html @@ -0,0 +1,418 @@ + + + + + JSDoc: Class: openpgp_msg_publickey + + + + + + + + + + +
+ +

Class: openpgp_msg_publickey

+ + + + + +
+ +
+

+ openpgp_msg_publickey +

+ +
Decoded public key object for internal openpgp.js use
+ +
+ +
+
+ + + + +
+

new openpgp_msg_publickey

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9987
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> getEncryptionKey

+ + +
+
+ + +
+ finds an encryption key for this public key +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10184
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ null if no encryption key has been found +
+ + + + + + +
+ + + +
+

<inner> read_nodes

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10004
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ last position +
+ + + + + + +
+ + + +
+

<inner> verifyBasicSignatures

+ + +
+
+ + +
+ verifies: + - revocation certificates directly on key + - self signatures + - subkey binding and revocation certificates + + This is useful for validating the key +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10125
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ true if the basic signatures are all valid +
+ + + + + + +
+ + + +
+

<inner> verifyCertificationSignatures

+ + +
+
+ + +
+ verifies all signatures +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10107
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ a 2 dimensional array. the first dimension corresponds to the userids available +
+ + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + +