From f300b0a1c0c9aac8142d22600330ee513694d9c3 Mon Sep 17 00:00:00 2001 From: Sean Colyer Date: Tue, 21 Aug 2012 23:23:06 -0400 Subject: [PATCH] Started modifying inline docs to work with jsdoc3 project, https://github.com/jsdoc3/jsdoc. Built doc based on our source and added to doc directory. Our inline docs need more cleanup, but this document structure looks promising. --- doc/JXG.Util.html | 468 ++ doc/global.html | 7382 +++++++++++++++++++ doc/index.html | 141 + doc/openpgp.html | 1245 ++++ doc/styles/jsdoc-default.css | 278 + doc/styles/node-dark.css | 150 + resources/openpgp.js | 63 +- resources/openpgp.min.js | 2 +- src/ciphers/asymmetric/rsa.js | 2 +- src/encoding/openpgp.encoding.asciiarmor.js | 2 +- src/openpgp.js | 41 +- src/openpgp.keyring.js | 10 +- src/packet/openpgp.packet.signature.js | 6 +- 13 files changed, 9730 insertions(+), 60 deletions(-) create mode 100644 doc/JXG.Util.html create mode 100644 doc/global.html create mode 100644 doc/index.html create mode 100644 doc/openpgp.html create mode 100644 doc/styles/jsdoc-default.css create mode 100644 doc/styles/node-dark.css diff --git a/doc/JXG.Util.html b/doc/JXG.Util.html new file mode 100644 index 00000000..9e00a877 --- /dev/null +++ b/doc/JXG.Util.html @@ -0,0 +1,468 @@ + + + + + JSDoc: Class: Util + + + + + + + + + + +
+ +

Class: Util

+ + + + + +
+ +
+

+ Util +

+ +
Util class +Class for gunzipping, unzipping and base64 decoding of files. +It is used for reading GEONExT, Geogebra and Intergeo files. + +Only Huffman codes are decoded in gunzip. +The code is based on the source code for gunzip.c by Pasi Ojala
+ +
+ +
+
+ + + + +
+

new Util

+ + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10934
+ + + + + +
See:
+
+ +
+ + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

<static> Base64

+ + +
+
+ +
+ Base64 encoding / decoding +
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 11812
+ + + + + +
See:
+
+ +
+ + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+

<static> genUUID

+ + +
+
+ + +
+ Generate a random uuid. +http://www.broofa.com +mailto:robert@broofa.com + +Copyright (c) 2010 Robert Kieffer +Dual licensed under the MIT and GPL licenses. + +EXAMPLES: + >>> Math.uuid() + "92329D39-6F5C-4520-ABFC-AAB64544E172" +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12088
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

<static> Unzip

+ + +
+
+ + +
+ Unzip zip files +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10939
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

<static> utf8Decode

+ + +
+
+ + +
+ Decoding string into utf-8 +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
string + + String + + + to decode
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 12050
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ utf8 decoded string +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/global.html b/doc/global.html new file mode 100644 index 00000000..f01a09bd --- /dev/null +++ b/doc/global.html @@ -0,0 +1,7382 @@ + + + + + JSDoc: Global + + + + + + + + + + +
+ +

Global

+ + + + + +
+ +
+

+ +

+ +
+ +
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + +

Members

+ +
+ +
+

crc_table

+ + +
+
+ +
+ Internal function to calculate a CRC-24 checksum over a given string (data) +
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10861
+ + + + + + + +
+ + + +
+ + + +
+

debug

+ + +
+
+ +
+ if enabled, debug messages will be printed +
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10283
+ + + + + + + +
+ + + +
+ + + +
+

default_config

+ + +
+
+ +
+ the default config object which is used if no +configuration was in place +
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10251
+ + + + + + + +
+ + + +
+ + + +
+

hash_headers

+ + +
+
+ +
+ ASN1 object identifiers for hashes (See RFC4880 5.2.2) +
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10527
+ + + + + + + +
+ + + +
+ + + +
+

util

+ + +
+
+ +
+ an instance that should be used. +
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15272
+ + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+

bin2str

+ + +
+
+ + +
+ convert an array of integers(0.255) to a string +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
[Array + + [Integer 0..255]] array of (binary) integers to convert
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15102
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] string representation of the array +
+ + + + + + +
+ + + +
+

calc_checksum

+ + +
+
+ + +
+ calculates a 16bit sum of a string by adding each character codes modulus 65535 +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
text + + [String] string to create a sum of
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15141
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [Integer] an integer containing the sum of all character codes % 65535 +
+ + + + + + +
+ + + +
+

get_hashAlgorithmString

+ + +
+
+ + +
+ Return the algorithm type as string +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15248
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] String representing the message type +
+ + + + + + +
+ + + +
+

getCheckSum

+ + +
+
+ + +
+ Calculates a checksum over the given data and returns it base64 encoded +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
data + + [String] data to create a CRC-24 checksum for
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10837
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] base64 encoded checksum +
+ + + + + + +
+ + + +
+

getPGPMessageType

+ + +
+
+ + +
+ Finds out which Ascii Armoring type is used. This is an internal function +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
text + + [String] ascii armored text
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10710
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ 0 = MESSAGE PART n of m + 1 = MESSAGE PART n + 2 = SIGNED MESSAGE + 3 = PGP MESSAGE + 4 = PUBLIC KEY BLOCK + 5 = PRIVATE KEY BLOCK + null = unknown +
+ + + + + + +
+ + + +
+

hex2bin

+ + +
+
+ + +
+ create binary string from a hex encoded string +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
str + + [String] hex string to convert
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15058
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] string containing the binary values +
+ + + + + + +
+ + + +
+

hexidump

+ + +
+
+ + +
+ creating a hex string from an binary array of integers (0..255) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
[Array[integer + + 0..255]] array to convert
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15070
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] hexadecimal representation of the array +
+ + + + + + +
+ + + +
+

hexstrdump

+ + +
+
+ + +
+ create hexstring from a binary +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
str + + [String] string to convert
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15038
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] string containing the hexadecimal values +
+ + + + + + +
+ + + +
+

MD5

+ + +
+
+ + +
+ A fast MD5 JavaScript implementation +Copyright (c) 2012 Joseph Myers +http://www.myersdaily.org/joseph/javascript/md5-text.html + +Permission to use, copy, modify, and distribute this software +and its documentation for any purposes and without +fee is hereby granted provided that this copyright notice +appears in all copies. + +Of course, this soft is provided "as is" without express or implied +warranty of any kind. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 3485
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_cfb_decrypt

+ + +
+
+ + +
+ This function decrypts a given plaintext using the specified +blockcipher to decrypt a message +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
blockcipherfn + + the algorithm _encrypt_ function to encrypt + data in one block_size encryption. The function must be + specified as blockcipherfn([integer_array(integers 0..255)] + block,[integer_array(integers 0..255)] key) returning an + array of bytes (integers 0..255)
block_size + + the block size in bytes of the algorithm used
plaintext + + ciphertext to be decrypted provided as a string
key + + key to be used to decrypt the ciphertext as + integer_array(integers 0..255)]. This will be passed to the + blockcipherfn
resync + + a boolean value specifying if a resync of the + IV should be used or not. The encrypteddatapacket uses the + "old" style with a resync. Decryption within an + encryptedintegrityprotecteddata packet is not resyncing the IV.
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9027
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ a string with the plaintext data +
+ + + + + + +
+ + + +
+

openpgp_cfb_encrypt

+ + +
+
+ + +
+ This function encrypts a given with the specified prefixrandom +using the specified blockcipher to encrypt a message +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
prefixrandom + + random bytes of block_size length provided + as a string to be used in prefixing the data
blockcipherfn + + the algorithm encrypt function to encrypt + data in one block_size encryption. The function must be + specified as blockcipherfn([integer_array(integers 0..255)] + block,[integer_array(integers 0..255)] key) returning an + array of bytes (integers 0..255)
block_size + + the block size in bytes of the algorithm used
plaintext + + data to be encrypted provided as a string
key + + key to be used to encrypt the data as + integer_array(integers 0..255)]. This will be passed to the + blockcipherfn
resync + + a boolean value specifying if a resync of the + IV should be used or not. The encrypteddatapacket uses the + "old" style with a resync. Encryption within an + encryptedintegrityprotecteddata packet is not resyncing the IV.
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 8890
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ a string with the encrypted data +
+ + + + + + +
+ + + +
+

openpgp_cfb_mdc

+ + +
+
+ + +
+ decrypts the prefixed data for the Modification Detection Code (MDC) computation +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
blockcipherencryptfn + + cipher function to use
block_size + + blocksize of the algorithm
key + + the key for encryption
ciphertext + + the encrypted data
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 8986
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ plaintext data of D(ciphertext) with blocksize length +2 +
+ + + + + + +
+ + + +
+

openpgp_config

+ + +
+
+ + +
+ Implementation of the GPG4Browsers config object + +This object contains configuration values and implements +storing and retrieving configuration them from HTML5 local storage. + +This object can be accessed after calling openpgp.init() +using openpgp.config +Stored config parameters can be accessed using +openpgp.config.config +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10244
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_crypto_asymetricDecrypt

+ + +
+
+ + +
+ Decrypts data using the specified public key multiprecision integers of the private key, +the specified secretMPIs of the private key and the specified algorithm. +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + [Integer] Algorithm to be used (See RFC4880 9.1)
publicMPIs + + [Array[openpgp_type_mpi]] algorithm dependent multiprecision integers of the public key part of the private key
secretMPIs + + [Array[openpgp_type_mpi]] algorithm dependent multiprecision integers of the private key used
data + + [openpgp_type_mpi] data to be encrypted as MPI
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9195
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [BigInteger] returns a big integer containing the decrypted data; otherwise null +
+ + + + + + +
+ + + +
+

openpgp_crypto_asymetricEncrypt

+ + +
+
+ + +
+ Encrypts data using the specified public key multiprecision integers +and the specified algorithm. +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + [Integer] Algorithm to be used (See RFC4880 9.1)
publicMPIs + + [Array[openpgp_type_mpi]] algorithm dependent multiprecision integers
data + + [openpgp_type_mpi] data to be encrypted as MPI
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9163
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [Object] if RSA an openpgp_type_mpi; if elgamal encryption an array of two +openpgp_type_mpi is returned; otherwise null +
+ + + + + + +
+ + + +
+

openpgp_crypto_generateKeyPair

+ + +
+
+ + +
+ calls the necessary crypto functions to generate a keypair. Called directly by openpgp.js +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9535
+ + + + + + + +
+ + + + + + + +
Returns:
+ + + + + +
+
+ Type +
+
+ + privateKey: [openpgp_packet_keymaterial] , publicKey: [openpgp_packet_keymaterial] + +
+
+ + + + +
+ + + +
+

openpgp_crypto_generateSessionKey

+ + +
+
+ + +
+ Generating a session key for the specified symmetric algorithm +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + [Integer] algorithm to use (see RFC4880 9.2)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9278
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] random bytes as a string to be used as a key +
+ + + + + + +
+ + + +
+

openpgp_crypto_getHashByteLength

+ + +
+
+ + +
+ returns the hash size in bytes of the specified hash algorithm type +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + [Integer] hash algorithm type (See RFC4880 9.4)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9423
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [Integer] size in bytes of the resulting hash +
+ + + + + + +
+ + + +
+

openpgp_crypto_getPrefixRandom

+ + +
+
+ + +
+ generate random byte prefix as string for the specified algorithm +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + [Integer] algorithm to use (see RFC4880 9.2)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9226
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] random bytes with length equal to the block +size of the cipher +
+ + + + + + +
+ + + +
+

openpgp_crypto_getPseudoRandom

+ + +
+
+ + +
+ return a pseudo-random number in the specified range +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
from + + [Integer] min of the random number
to + + [Integer] max of the random number (max 32bit)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9462
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [Integer] a pseudo random number +
+ + + + + + +
+ + + +
+

openpgp_crypto_getRandomBigInteger

+ + +
+
+ + +
+ create a secure random big integer of bits length +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
bits + + [Integer] bit length of the MPI to create
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9492
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [BigInteger] resulting big integer +
+ + + + + + +
+ + + +
+

openpgp_crypto_getRandomBytes

+ + +
+
+ + +
+ retrieve secure random byte string of the specified length +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
length + + [Integer] length in bytes to generate
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9448
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] random byte string +
+ + + + + + +
+ + + +
+

openpgp_crypto_getSecureRandom

+ + +
+
+ + +
+ return a secure random number in the specified range +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
from + + [Integer] min of the random number
to + + [Integer] max of the random number (max 32bit)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9472
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [Integer] a secure random number +
+ + + + + + +
+ + + +
+

openpgp_crypto_hashData

+ + +
+
+ + +
+ create a hash on the specified data using the specified algorithm +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + [Integer] hash algorithm type (see RFC4880 9.4)
data + + [String] data to be hashed
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9389
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] hash value +
+ + + + + + +
+ + + +
+

openpgp_crypto_MDCSystemBytes

+ + +
+
+ + +
+ retrieve the MDC prefixed bytes by decrypting them +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + [Integer] algorithm to use (see RFC4880 9.2)
key + + [String] key as string. length is depending on the algorithm used
data + + [String] encrypted data where the prefix is decrypted from
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9249
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] plain text data of the prefixed data +
+ + + + + + +
+ + + +
+

openpgp_crypto_signData

+ + +
+
+ + +
+ Create a signature on data using the specified algorithm +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
hash_algo + + [Integer] hash algorithm to use (See RFC4880 9.4)
algo + + [Integer] asymmetric cipher algorithm to use (See RFC4880 9.1)
publicMPIs + + [Array[openpgp_type_mpi]] public key multiprecision integers of the private key
secretMPIs + + [Array[openpgp_type_mpi]] private key multiprecision integers which is used to sign the data
data + + [String] data to be signed
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9351
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String or openpgp_type_mpi] +
+ + + + + + +
+ + + +
+

openpgp_crypto_symmetricDecrypt

+ + +
+
+ + +
+ Symmetrically decrypts data using a key with length depending on the +algorithm in openpgp_cfb mode with or without resync (MDC style) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + [Integer] algorithm to use (see RFC4880 9.2)
key + + [String] key as string. length is depending on the algorithm used
data + + [String] data to be decrypted
openpgp_cfb + + [boolean] if true use the resync (for encrypteddata); +otherwise use without the resync (for MDC encrypted data)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 8824
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] plaintext data +
+ + + + + + +
+ + + +
+

openpgp_crypto_symmetricEncrypt

+ + +
+
+ + +
+ Symmetrically encrypts data using prefixedrandom, a key with length +depending on the algorithm in openpgp_cfb mode with or without resync +(MDC style) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
prefixrandom + + secure random bytes as string in length equal to the +block size of the algorithm used (use openpgp_crypto_getPrefixRandom(algo) +to retrieve that string
algo + + [Integer] algorithm to use (see RFC4880 9.2)
key + + [String] key as string. length is depending on the algorithm used
data + + [String] data to encrypt
openpgp_cfb + + [boolean]
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 8790
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] encrypted data +
+ + + + + + +
+ + + +
+

openpgp_crypto_verifySignature

+ + +
+
+ + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + [Integer] public key algorithm
hash_algo + + [Integer] hash algorithm
msg_MPIs + + [Array[openpgp_type_mpi]] signature multiprecision integers
publickey_MPIs + + [Array[openpgp_type_mpi]] public key multiprecision integers
data + + [String] data on where the signature was computed on.
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9304
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ true if signature (sig_data was equal to data over hash) +
+ + + + + + +
+ + + +
+

openpgp_encoding_armor

+ + +
+
+ + +
+ Armor an OpenPGP binary packet block +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
messagetype + + type of the message
data + +
partindex + +
parttotal + +
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10780
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ Armored text +
+ + + + +
+
+ Type +
+
+ + string + +
+
+ + + + +
+ + + +
+

openpgp_encoding_armor_addheader

+ + +
+
+ + +
+ Add additional information to the armor version of an OpenPGP binary +packet block. +
+ + + + + + + +
+ + + +
Version:
+
  • 2011-12-16
+ + + + + + + +
Author:
+
+
    +
  • Alex
  • +
+
+ + + + + + + + + +
Source:
+
  • openpgp.js, line 10760
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ The header information +
+ + + + + + +
+ + + +
+

openpgp_encoding_base64_decode

+ + +
+
+ + +
+ Wrapper function for the base64 codec. +This function decodes a String(message) in base64 (radix-64) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
message + + [String] base64 encoded data
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10473
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] raw data after decoding +
+ + + + + + +
+ + + +
+

openpgp_encoding_base64_encode

+ + +
+
+ + +
+ Wrapper function for the base64 codec. +This function encodes a String (message) in base64 (radix-64) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
message + + [String] the message to encode
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10462
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] the base64 encoded data +
+ + + + + + +
+ + + +
+

openpgp_encoding_deArmor

+ + +
+
+ + +
+ DeArmor an OpenPGP armored message; verify the checksum and return the encoded bytes +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10677
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ either the bytes of the decoded message or an object with attribute "text" containing the message text +and an attribute "openpgp" containing the bytes. +
+ + + + + + +
+ + + +
+

openpgp_encoding_eme_pkcs1_decode

+ + +
+
+ + +
+ decodes a EME-PKCS1-v1_5 padding (See RFC4880 13.1.2) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
message + + [String] EME-PKCS1 padded message
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10514
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] decoded message +
+ + + + + + +
+ + + +
+

openpgp_encoding_eme_pkcs1_encode

+ + +
+
+ + +
+ create a EME-PKCS1-v1_5 padding (See RFC4880 13.1.1) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
message + + [String] message to be padded
length + + [Integer] length to the resulting message
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10495
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] EME-PKCS1 padded message +
+ + + + + + +
+ + + +
+

openpgp_encoding_emsa_pkcs1_decode

+ + +
+
+ + +
+ extract the hash out of an EMSA-PKCS1-v1.5 padding (See RFC4880 13.1.3) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
data + + [String] hash in pkcs1 encoding
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10563
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ the hash as string +
+ + + + + + +
+ + + +
+

openpgp_encoding_emsa_pkcs1_encode

+ + +
+
+ + +
+ create a EMSA-PKCS1-v1_5 padding (See RFC4880 13.1.3) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
algo + + [Integer] hash algorithm type used
data + + [String] data to be hashed
keylength + + [Integer] key size of the public mpi in bytes
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10543
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ the [String] hashcode with pkcs1padding as string +
+ + + + + + +
+ + + +
+

openpgp_encoding_html_encode

+ + +
+
+ + +
+ Wrapper function for jquery library. +This function escapes HTML characters within a string. This is used to prevent XSS. +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
message + + [String] message to escape
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10483
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] html encoded string +
+ + + + + + +
+ + + +
+

openpgp_packet_compressed

+ + +
+
+ + +
+ Implementation of the Compressed Data Packet (Tag 8) + +RFC4880 5.6: +The Compressed Data packet contains compressed data. Typically, this +packet is found as the contents of an encrypted packet, or following +a Signature or One-Pass Signature packet, and contains a literal data +packet. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 2532
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_encrypteddata

+ + +
+
+ + +
+ Implementation of the Symmetrically Encrypted Data Packet (Tag 9) + +RFC4880 5.7: The Symmetrically Encrypted Data packet contains data encrypted +with a symmetric-key algorithm. When it has been decrypted, it contains other +packets (usually a literal data packet or compressed data packet, but in +theory other Symmetrically Encrypted Data packets or sequences of packets +that form whole OpenPGP messages). +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1868
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_encryptedintegrityprotecteddata

+ + +
+
+ + +
+ Implementation of the Sym. Encrypted Integrity Protected Data Packet (Tag 18) + +RFC4880 5.13: The Symmetrically Encrypted Integrity Protected Data packet is +a variant of the Symmetrically Encrypted Data packet. It is a new feature +created for OpenPGP that addresses the problem of detecting a modification to +encrypted data. It is used in combination with a Modification Detection Code +packet. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 963
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_encryptedsessionkey

+ + +
+
+ + +
+ Public-Key Encrypted Session Key Packets (Tag 1) + +RFC4880 5.1: A Public-Key Encrypted Session Key packet holds the session key +used to encrypt a message. Zero or more Public-Key Encrypted Session Key +packets and/or Symmetric-Key Encrypted Session Key packets may precede a +Symmetrically Encrypted Data Packet, which holds an encrypted message. The +message is encrypted with the session key, and the session key is itself +encrypted and stored in the Encrypted Session Key packet(s). The +Symmetrically Encrypted Data Packet is preceded by one Public-Key Encrypted +Session Key packet for each OpenPGP key to which the message is encrypted. +The recipient of the message finds a session key that is encrypted to their +public key, decrypts the session key, and then uses the session key to +decrypt the message. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1540
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_keymaterial

+ + +
+
+ + +
+ Implementation of the Key Material Packet (Tag 5,6,7,14) + +RFC4480 5.5: +A key material packet contains all the information about a public or +private key. There are four variants of this packet type, and two +major versions. Consequently, this section is complex. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 2693
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_literaldata

+ + +
+
+ + +
+ Implementation of the Literal Data Packet (Tag 11) + +RFC4880 5.9: A Literal Data packet contains the body of a message; data that +is not to be further interpreted. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1765
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_marker

+ + +
+
+ + +
+ Implementation of the strange "Marker packet" (Tag 10) + +RFC4880 5.8: An experimental version of PGP used this packet as the Literal +packet, but no released version of PGP generated Literal packets with this +tag. With PGP 5.x, this packet has been reassigned and is reserved for use as +the Marker packet. + +Such a packet MUST be ignored when received. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 145
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_modificationdetectioncode

+ + +
+
+ + +
+ Implementation of the Modification Detection Code Packet (Tag 19) + +RFC4880 5.14: The Modification Detection Code packet contains a SHA-1 hash of +plaintext data, which is used to detect message modification. It is only used +with a Symmetrically Encrypted Integrity Protected Data packet. The +Modification Detection Code packet MUST be the last packet in the plaintext +data that is encrypted in the Symmetrically Encrypted Integrity Protected +Data packet, and MUST appear in no other place. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1123
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_onepasssignature

+ + +
+
+ + +
+ Implementation of the One-Pass Signature Packets (Tag 4) + +RFC4880 5.4: +The One-Pass Signature packet precedes the signed data and contains +enough information to allow the receiver to begin calculating any +hashes needed to verify the signature. It allows the Signature +packet to be placed at the end of the message, so that the signer +can compute the entire signed message in one pass. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 28
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_signature

+ + +
+
+ + +
+ Implementation of the Signature Packet (Tag 2) + +RFC4480 5.2: +A Signature packet describes a binding between some public key and +some data. The most common signatures are a signature of a file or a +block of text, and a signature that is a certification of a User ID. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 206
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_userattribute

+ + +
+
+ + +
+ The User Attribute packet is a variation of the User ID packet. It + is capable of storing more types of data than the User ID packet, + which is limited to text. Like the User ID packet, a User Attribute + packet may be certified by the key owner ("self-signed") or any other + key owner who cares to certify it. Except as noted, a User Attribute + packet may be used anywhere that a User ID packet may be used. + + While User Attribute packets are not a required part of the OpenPGP + standard, implementations SHOULD provide at least enough + compatibility to properly handle a certification signature on the + User Attribute packet. A simple way to do this is by treating the + User Attribute packet as a User ID packet with opaque contents, but + an implementation may use any method desired. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1977
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_packet_userid

+ + +
+
+ + +
+ A User ID packet consists of UTF-8 text that is intended to represent +the name and email address of the key holder. By convention, it +includes an RFC 2822 [RFC2822] mail name-addr, but there are no +restrictions on its content. The packet length in the header +specifies the length of the User ID. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 1199
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_type_keyid

+ + +
+
+ + +
+ Implementation of type key id (RFC4880 3.3) + A Key ID is an eight-octet scalar that identifies a key. + Implementations SHOULD NOT assume that Key IDs are unique. The + section "Enhanced Key Formats" below describes how Key IDs are + formed. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 14601
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_type_mpi

+ + +
+
+ + +
+ Implementation of type MPI (RFC4880 3.2) + Multiprecision integers (also called MPIs) are unsigned integers used + to hold large integers such as the ones used in cryptographic + calculations. + An MPI consists of two pieces: a two-octet scalar that is the length + of the MPI in bits followed by a string of octets that contain the + actual integer. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 14476
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+

openpgp_type_s2k

+ + +
+
+ + +
+ Implementation of the String-to-key specifier (RFC4880 3.7) +String-to-key (S2K) specifiers are used to convert passphrase strings + into symmetric-key encryption/decryption keys. They are used in two + places, currently: to encrypt the secret part of private keys in the + private keyring, and to convert passphrases to encryption keys for + symmetrically encrypted messages. +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 14649
+ + + + + + + +
+ + + + + + + + + +
+ + + +
+ + + +
+
+ + +
+ Helper function to print a debug message. Debug +messages are only printed if +openpgp.config.debug is set to true. The calling +Javascript context MUST define +a "showMessages(text)" function. Line feeds ('\n') +are automatically converted to HTML line feeds '
' +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
str + + [String] string of the debug message
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15159
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] an HTML tt entity containing a paragraph with a style attribute where the debug message is HTMLencoded in. +
+ + + + + + +
+ + + +
+ + + +
+
+ + +
+ Helper function to print a debug message. Debug +messages are only printed if +openpgp.config.debug is set to true. The calling +Javascript context MUST define +a "showMessages(text)" function. Line feeds ('\n') +are automatically converted to HTML line feeds '
' +Different than print_debug because will call hexstrdump iff necessary. +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
str + + [String] string of the debug message
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15177
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] an HTML tt entity containing a paragraph with a style attribute where the debug message is HTMLencoded in. +
+ + + + + + +
+ + + +
+ + + +
+
+ + +
+ Helper function to print an error message. +The calling Javascript context MUST define +a "showMessages(text)" function. Line feeds ('\n') +are automatically converted to HTML line feeds '
' +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
str + + [String] string of the error message
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15193
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] a HTML paragraph entity with a style attribute containing the HTML encoded error message +
+ + + + + + +
+ + + +
+ + + +
+
+ + +
+ Helper function to print an info message. +The calling Javascript context MUST define +a "showMessages(text)" function. Line feeds ('\n') +are automatically converted to HTML line feeds '
'. +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
str + + [String] string of the info message
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15206
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] a HTML paragraph entity with a style attribute containing the HTML encoded info message +
+ + + + + + +
+ + + +
+

shiftRight

+ + +
+
+ + +
+ Shifting a string to n bits right +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
value + + [String] the string to shift
bitcount + + [Integer] amount of bits to shift (MUST be smaller than 9)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15230
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] resulting string. +
+ + + + + + +
+ + + +
+

str2bin

+ + +
+
+ + +
+ convert a string to an array of integers(0.255) +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
String + + + + <optional>
+ + + +
string to convert
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15088
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [Array [Integer 0..255]] array of (binary) integers +
+ + + + + + +
+ + + +
+

str2Uint8Array

+ + +
+
+ + +
+ convert a string to a Uint8Array +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
String + + + + <optional>
+ + + +
string to convert
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15115
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [Uint8Array] array of (binary) integers +
+ + + + + + +
+ + + +
+

Uint8Array2str

+ + +
+
+ + +
+ convert a Uint8Array to a string. This currently functions the same as bin2str. +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
Uint8Array + + + + <optional>
+ + + +
array of (binary) integers to convert
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 15128
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [String] string representation of the array +
+ + + + + + +
+ + + +
+

verifyCheckSum

+ + +
+
+ + +
+ Calculates the checksum over the given data and compares it with the given base64 encoded checksum +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
data + + [String] data to create a CRC-24 checksum for
checksum + + [String] base64 encoded checksum
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10851
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ true if the given checksum is correct; otherwise false +
+ + + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 00000000..4e2a7cb1 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,141 @@ + + + + + JSDoc: Index + + + + + + + + + + +
+ +

Index

+ + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + +
+ +
+

+ file:openpgp.js +

+ +
+ +
+
+ + + + +
Utilities for uncompressing and base64 decoding
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 10901
+ + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/openpgp.html b/doc/openpgp.html new file mode 100644 index 00000000..1f4c292d --- /dev/null +++ b/doc/openpgp.html @@ -0,0 +1,1245 @@ + + + + + JSDoc: Class: openpgp + + + + + + + + + + +
+ +

Class: openpgp

+ + + + + +
+ +
+

+ openpgp +

+ +
Main Openpgp.js class. Use this to initiate and make all calls to this library.
+ +
+ +
+
+ + + + +
+

new openpgp

+ + +
+
+ + +
+ GPG4Browsers Core interface. A single instance is hold +from the beginning. To use this library call "openpgp.init()" +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9577
+ + + + + + + +
+ + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+

<inner> generate_key_pair

+ + +
+
+ + +
+ generates a new key pair for openpgp. Beta stage. Currently only supports RSA keys, and no subkeys. +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
keyType + + int + + + to indicate what type of key to make. RSA is 1. Follows algorithms outlined in OpenPGP.
numBits + + int + + + number of bits for the key creation. (should be 1024+, generally)
userId + + string + + + assumes already in form of "User Name "
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9924
+ + + + + + + +
+ + + + + + + +
Returns:
+ + + + + +
+
+ Type +
+
+ + privateKey: [openpgp_msg_privatekey], privateKeyArmored: [string], publicKeyArmored: [string] + +
+
+ + + + +
+ + + +
+

<inner> init

+ + +
+
+ + +
+ initializes the library: +- reading the keyring from local storage +- reading the config from local storage +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9586
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ [void] +
+ + + + + + +
+ + + +
+

<inner> read_message

+ + +
+
+ + +
+ reads message packets out of an OpenPGP armored text and +returns an array of message objects +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
armoredText + + String + + + text to be parsed
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9677
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ on error the function +returns null +
+ + + + +
+
+ Type +
+
+ + Array[openpgp_msg_message] + +
+
+ + + + +
+ + + +
+

<inner> read_privateKey

+ + +
+
+ + +
+ reads several privateKey objects from a ascii armored +representation an returns openpgp_msg_privatekey objects +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
armoredText + + String + + + OpenPGP armored text containing +the private key(s)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9647
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ on error the function +returns null +
+ + + + +
+
+ Type +
+
+ + Array[openpgp_msg_privatekey] + +
+
+ + + + +
+ + + +
+

<inner> read_publicKey

+ + +
+
+ + +
+ reads several publicKey objects from a ascii armored +representation an returns openpgp_msg_publickey packets +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
armoredText + + String + + + OpenPGP armored text containing +the public key(s)
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9601
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ on error the function +returns null +
+ + + + +
+
+ Type +
+
+ + Array[openpgp_msg_publickey] + +
+
+ + + + +
+ + + +
+

<inner> write_encrypted_message

+ + +
+
+ + +
+ creates a binary string representation of an encrypted message. +The message will be encrypted with the public keys specified +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
publickeys + + Array {obj: [openpgp_msg_publickey]} + + + public +keys to be used to encrypt the message
messagetext + + String + + + message text to encrypt
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9868
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ a binary string representation of the message +which can be OpenPGP armored +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ + + +
+

<inner> write_signed_and_encrypted_message

+ + +
+
+ + +
+ creates a binary string representation of an encrypted and signed message. +The message will be encrypted with the public keys specified and signed +with the specified private key. +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
privatekey + + obj: [openpgp_msg_privatekey] + + + private key to be used to sign the message
publickeys + + Array {obj: [openpgp_msg_publickey]} + + + public keys to be used to encrypt the message
messagetext + + String + + + message text to encrypt and sign
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9811
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ a binary string representation of the message which can be OpenPGP armored +
+ + + + +
+
+ Type +
+
+ + String + +
+
+ + + + +
+ + + +
+

<inner> write_signed_message

+ + +
+
+ + +
+ creates a binary string representation a signed message. +The message will be signed with the specified private key. +
+ + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
privatekey + + obj: [openpgp_msg_privatekey] + + + private +key to be used to sign the message
messagetext + + String + + + message text to sign
+ + + +
+ + + + + + + + + + + + + + + + + +
Source:
+
  • openpgp.js, line 9911
+ + + + + + + +
+ + + + + + + +
Returns:
+ + +
+ , openpgp: {String} a binary + string representation of the message which can be OpenPGP + armored(openpgp) and a text representation of the message (text). This can be directly used to OpenPGP armor the message +
+ + + + +
+
+ Type +
+
+ + Object: text [String] + +
+
+ + + + +
+ +
+ + + + + +
+ +
+ + + + +
+ + + +
+ + + + + + diff --git a/doc/styles/jsdoc-default.css b/doc/styles/jsdoc-default.css new file mode 100644 index 00000000..6622cc10 --- /dev/null +++ b/doc/styles/jsdoc-default.css @@ -0,0 +1,278 @@ +html +{ + overflow: auto; + background-color: #fff; +} + +body +{ + font: 14px "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans serif; + line-height: 130%; + color: #000; + background-color: #fff; +} + +a { + color: #444; +} + +a:visited { + color: #444; +} + +a:active { + color: #444; +} + +header +{ + display: block; + padding: 6px 4px; +} + +.class-description { + font-style: italic; + font-family: Palatino, 'Palatino Linotype', serif; + font-size: 130%; + line-height: 140%; + margin-bottom: 1em; + margin-top: 1em; +} + +#main { + float: left; + width: 100%; +} + +section +{ + display: block; + + background-color: #fff; + padding: 12px 24px; + border-bottom: 1px solid #ccc; + margin-right: 240px; +} + +.variation { + display: none; +} + +.optional:after { + content: "opt"; + font-size: 60%; + color: #aaa; + font-style: italic; + font-weight: lighter; +} + +nav +{ + display: block; + float: left; + margin-left: -230px; + margin-top: 28px; + width: 220px; + border-left: 1px solid #ccc; + padding-left: 9px; +} + +nav ul { + font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif; + font-size: 100%; + line-height: 17px; + padding:0; + margin:0; + list-style-type:none; +} + +nav h2 a, nav h2 a:visited { + color: #A35A00; + text-decoration: none; +} + +nav h3 { + margin-top: 12px; +} + +nav li { + margin-top: 6px; +} + +nav a { + color: #5C5954; +} + +nav a:visited { + color: #5C5954; +} + +nav a:active { + color: #5C5954; +} + +footer { + display: block; + padding: 6px; + margin-top: 12px; + font-style: italic; + font-size: 90%; +} + +h1 +{ + font-size: 200%; + font-weight: bold; + letter-spacing: -0.01em; + margin: 6px 0 9px 0; +} + +h2 +{ + font-size: 170%; + font-weight: bold; + letter-spacing: -0.01em; + margin: 6px 0 3px 0; +} + +h3 +{ + font-size: 150%; + font-weight: bold; + letter-spacing: -0.01em; + margin-top: 16px; + margin: 6px 0 3px 0; +} + +h4 +{ + font-size: 130%; + font-weight: bold; + letter-spacing: -0.01em; + margin-top: 16px; + margin: 18px 0 3px 0; + color: #A35A00; +} + +h5, .container-overview .subsection-title +{ + font-size: 120%; + font-weight: bold; + letter-spacing: -0.01em; + margin: 8px 0 3px -16px; +} + +h6 +{ + font-size: 100%; + letter-spacing: -0.01em; + margin: 6px 0 3px 0; + font-style: italic; +} + +.ancestors { color: #999; } +.ancestors a +{ + color: #999 !important; + text-decoration: none; +} + +.important +{ + font-weight: bold; + color: #950B02; +} + +.yes-def { + text-indent: -1000px; +} + +.type-signature { + color: #aaa; +} + +.name, .signature { + font-family: Consolas, "Lucida Console", Monaco, monospace; +} + +.details { margin-top: 14px; } +.details dt { width:100px; float:left; border-left: 2px solid #DDD; padding-left: 10px; padding-top: 6px; } +.details dd { margin-left: 50px; } +.details ul { margin: 0; } +.details ul { list-style-type: none; } +.details li { margin-left: 30px; padding-top: 6px; } + +.description { + margin-bottom: 1em; + margin-left: -16px; + margin-top: 1em; +} + +.code-caption +{ + font-style: italic; + font-family: Palatino, 'Palatino Linotype', serif; + font-size: 107%; + margin: 0; +} + +.sh_sourceCode +{ + border: 1px solid #ddd; + width: 80%; +} + +.sh_sourceCode code +{ + font-family: Consolas, 'Lucida Console', Monaco, monospace; + font-size: 100%; + line-height: 18px; + display: block; + padding: 4px 12px; + margin: 0; + background-color: #fff; + color: #000; + border-left: 3px #ddd solid; +} + +.params, .props +{ + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +.params .name, .props .name, .name code { + color: #A35A00; + font-family: Consolas, 'Lucida Console', Monaco, monospace; + font-size: 100%; +} + +.params td, .params th, .props td, .props th +{ + border: 1px solid #ddd; + margin: 0px; + text-align: left; + vertical-align: top; + padding: 4px 6px; + display: table-cell; +} + +.params thead tr, .props thead tr +{ + background-color: #ddd; + font-weight: bold; +} + +.params .params thead tr, .props .props thead tr +{ + background-color: #fff; + font-weight: bold; +} + +.params th, .props th { border-right: 1px solid #aaa; } +.params thead .last, .props thead .last { border-right: 1px solid #ddd; } + +.disabled { + color: #454545; +} diff --git a/doc/styles/node-dark.css b/doc/styles/node-dark.css new file mode 100644 index 00000000..5849e234 --- /dev/null +++ b/doc/styles/node-dark.css @@ -0,0 +1,150 @@ + .sh_sourceCode { + background-color: #ffffff; + color: #000000; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_keyword { + color: #000000; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_type { + color: #a52a2a; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_string { + color: #006400; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_regexp { + color: #006400; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_specialchar { + color: #2e8b57; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_comment { + color: #000000; + font-weight: normal; + font-style: italic; +} + + .sh_sourceCode .sh_number { + color: #006400; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_preproc { + color: #27408b; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_symbol { + color: #000000; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_function { + color: #000000; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_cbracket { + color: #000000; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_url { + color: #006400; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_date { + color: #000000; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_time { + color: #000000; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_file { + color: #000000; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_ip { + color: #006400; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_name { + color: #006400; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_variable { + color: #dda0dd; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_oldfile { + color: #2e8b57; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_newfile { + color: #006400; + font-weight: normal; + font-style: normal; +} + + .sh_sourceCode .sh_difflines { + color: #000000; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_selector { + color: #dda0dd; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_property { + color: #000000; + font-weight: bold; + font-style: normal; +} + + .sh_sourceCode .sh_value { + color: #006400; + font-weight: normal; + font-style: normal; +} diff --git a/resources/openpgp.js b/resources/openpgp.js index babed439..4e91f858 100644 --- a/resources/openpgp.js +++ b/resources/openpgp.js @@ -657,9 +657,9 @@ function openpgp_packet_signature() { }; /** * verifys the signature packet. Note: not signature types are implemented - * @param data [String] data which on the signature applies - * @param key [openpgp_msg_privatekey] the public key to verify the signature - * @return + * @param {String} data data which on the signature applies + * @param {openpgp_msg_privatekey} key the public key to verify the signature + * @return {boolean} True if message is verified, else false. */ function verify(data, key) { switch(this.signatureType) { @@ -7160,7 +7160,7 @@ function RSA() { * RSA q as BigInteger * @param u * RSA u as BigInteger - * @return + * @return {BigInteger} The decrypted value of the message */ function decrypt(m, d, p, q, u) { var xp = m.mod(p).modPow(d.mod(p.subtract(BigInteger.ONE)), p); @@ -9570,6 +9570,9 @@ function openpgp_crypto_generateKeyPair(keyType, numBits, passphrase, s2kHash, s /** * GPG4Browsers Core interface. A single instance is hold * from the beginning. To use this library call "openpgp.init()" + * @alias openpgp + * @class + * @classdesc Main Openpgp.js class. Use this to initiate and make all calls to this library. */ function _openpgp () { this.tostring = ""; @@ -9590,9 +9593,9 @@ function _openpgp () { /** * reads several publicKey objects from a ascii armored * representation an returns openpgp_msg_publickey packets - * @param armoredText [String] OpenPGP armored text containing + * @param {String} armoredText OpenPGP armored text containing * the public key(s) - * @return [Array[openpgp_msg_publickey]] on error the function + * @return {Array[openpgp_msg_publickey]} on error the function * returns null */ function read_publicKey(armoredText) { @@ -9636,9 +9639,9 @@ function _openpgp () { /** * reads several privateKey objects from a ascii armored * representation an returns openpgp_msg_privatekey objects - * @param armoredText [String] OpenPGP armored text containing + * @param {String} armoredText OpenPGP armored text containing * the private key(s) - * @return [Array[openpgp_msg_privatekey]] on error the function + * @return {Array[openpgp_msg_privatekey]} on error the function * returns null */ function read_privateKey(armoredText) { @@ -9667,8 +9670,8 @@ function _openpgp () { /** * reads message packets out of an OpenPGP armored text and * returns an array of message objects - * @param armoredText [String] text to be parsed - * @return [Array[openpgp_msg_message]] on error the function + * @param {String} armoredText text to be parsed + * @return {Array[openpgp_msg_message]} on error the function * returns null */ function read_message(armoredText) { @@ -9800,10 +9803,10 @@ function _openpgp () { * creates a binary string representation of an encrypted and signed message. * The message will be encrypted with the public keys specified and signed * with the specified private key. - * @param privatekey {obj: [openpgp_msg_privatekey]} private key to be used to sign the message - * @param publickeys [Array {obj: [openpgp_msg_publickey]}] public keys to be used to encrypt the message - * @param messagetext [String] message text to encrypt and sign - * @return [String] a binary string representation of the message which can be OpenPGP armored + * @param {obj: [openpgp_msg_privatekey]} privatekey private key to be used to sign the message + * @param {Array {obj: [openpgp_msg_publickey]}} publickeys public keys to be used to encrypt the message + * @param {String} messagetext message text to encrypt and sign + * @return {String} a binary string representation of the message which can be OpenPGP armored */ function write_signed_and_encrypted_message(privatekey, publickeys, messagetext) { var result = ""; @@ -9856,10 +9859,10 @@ function _openpgp () { /** * creates a binary string representation of an encrypted message. * The message will be encrypted with the public keys specified - * @param publickeys [Array {obj: [openpgp_msg_publickey]}] public + * @param {Array {obj: [openpgp_msg_publickey]}} publickeys public * keys to be used to encrypt the message - * @param messagetext [String] message text to encrypt - * @return [String] a binary string representation of the message + * @param {String} messagetext message text to encrypt + * @return {String} a binary string representation of the message * which can be OpenPGP armored */ function write_encrypted_message(publickeys, messagetext) { @@ -9898,10 +9901,10 @@ function _openpgp () { /** * creates a binary string representation a signed message. * The message will be signed with the specified private key. - * @param privatekey {obj: [openpgp_msg_privatekey]} private + * @param {obj: [openpgp_msg_privatekey]} privatekey private * key to be used to sign the message - * @param messagetext [String] message text to sign - * @return [Object: text [String], openpgp: [String] a binary + * @param {String} messagetext message text to sign + * @return {Object: text [String]}, openpgp: {String} a binary * string representation of the message which can be OpenPGP * armored(openpgp) and a text representation of the message (text). This can be directly used to OpenPGP armor the message */ @@ -9913,9 +9916,9 @@ function _openpgp () { /** * generates a new key pair for openpgp. Beta stage. Currently only supports RSA keys, and no subkeys. - * @param keyType [int] to indicate what type of key to make. RSA is 1. Follows algorithms outlined in OpenPGP. - * @param numBits [int] number of bits for the key creation. (should be 1024+, generally) - * @userId [string] assumes already in form of "User Name " + * @param {int} keyType to indicate what type of key to make. RSA is 1. Follows algorithms outlined in OpenPGP. + * @param {int} numBits number of bits for the key creation. (should be 1024+, generally) + * @param {string} userId assumes already in form of "User Name " * @return {privateKey: [openpgp_msg_privatekey], privateKeyArmored: [string], publicKeyArmored: [string]} */ function generate_key_pair(keyType, numBits, userId, passphrase){ @@ -10256,7 +10259,7 @@ function openpgp_config() { keyserver: "keyserver.linux.it" // "pgp.mit.edu:11371" }; - this.versionstring ="OpenPGP.js 20120730"; + this.versionstring ="OpenPGP.js v.1.20120821"; this.commentstring ="http://openpgpjs.org"; /** * reads the config out of the HTML5 local storage @@ -10772,7 +10775,7 @@ function openpgp_encoding_armor_addheader() { * @param data * @param partindex * @param parttotal - * @return + * @return {string} Armored text */ function openpgp_encoding_armor(messagetype, data, partindex, parttotal) { var result = ""; @@ -14794,7 +14797,7 @@ function openpgp_keyring() { /** * Checks if at least one private key is in the keyring - * @return + * @return {boolean} True if there are private keys, else false. */ function hasPrivateKey() { return this.privateKeys.length > 0; @@ -14822,7 +14825,7 @@ function openpgp_keyring() { /** * searches all public keys in the keyring matching the address or address part of the user ids * @param email_address - * @return + * @return {array[openpgp_msg_publickey]} the public keys associated with provided email address. */ function getPublicKeyForAddress(email_address) { var results = new Array(); @@ -14849,8 +14852,8 @@ function openpgp_keyring() { /** * Searches the keyring for a private key containing the specified email address - * @param email_address [String] email address to search for - * @return [Array[openpgp_msg_privatekey] private keys found + * @param {String} email_address email address to search for + * @return {Array[openpgp_msg_privatekey} private keys found */ function getPrivateKeyForAddress(email_address) { var results = new Array(); @@ -14878,7 +14881,7 @@ function openpgp_keyring() { /** * Searches the keyring for public keys having the specified key id * @param keyId provided as string of hex number (lowercase) - * @return Array[openpgp_msg_privatekey] public keys found + * @return {Array[openpgp_msg_privatekey]} public keys found */ function getPublicKeysForKeyId(keyId) { var result = new Array(); diff --git a/resources/openpgp.min.js b/resources/openpgp.min.js index e99372e8..7c47b5c6 100644 --- a/resources/openpgp.min.js +++ b/resources/openpgp.min.js @@ -392,7 +392,7 @@ return this.len=a-c};this.write=function(){};this.toString=function(){for(var a= this.subKeys.length;b++)a+=" "+this.subKeys[b].toString();return a};this.validate=function(){for(var a=0;a" + * @param {int} keyType to indicate what type of key to make. RSA is 1. Follows algorithms outlined in OpenPGP. + * @param {int} numBits number of bits for the key creation. (should be 1024+, generally) + * @param {string} userId assumes already in form of "User Name " * @return {privateKey: [openpgp_msg_privatekey], privateKeyArmored: [string], publicKeyArmored: [string]} */ function generate_key_pair(keyType, numBits, userId, passphrase){ diff --git a/src/openpgp.keyring.js b/src/openpgp.keyring.js index 4ab00016..db8d4109 100644 --- a/src/openpgp.keyring.js +++ b/src/openpgp.keyring.js @@ -54,7 +54,7 @@ function openpgp_keyring() { /** * Checks if at least one private key is in the keyring - * @return + * @return {boolean} True if there are private keys, else false. */ function hasPrivateKey() { return this.privateKeys.length > 0; @@ -82,7 +82,7 @@ function openpgp_keyring() { /** * searches all public keys in the keyring matching the address or address part of the user ids * @param email_address - * @return + * @return {array[openpgp_msg_publickey]} the public keys associated with provided email address. */ function getPublicKeyForAddress(email_address) { var results = new Array(); @@ -109,8 +109,8 @@ function openpgp_keyring() { /** * Searches the keyring for a private key containing the specified email address - * @param email_address [String] email address to search for - * @return [Array[openpgp_msg_privatekey] private keys found + * @param {String} email_address email address to search for + * @return {Array[openpgp_msg_privatekey} private keys found */ function getPrivateKeyForAddress(email_address) { var results = new Array(); @@ -138,7 +138,7 @@ function openpgp_keyring() { /** * Searches the keyring for public keys having the specified key id * @param keyId provided as string of hex number (lowercase) - * @return Array[openpgp_msg_privatekey] public keys found + * @return {Array[openpgp_msg_privatekey]} public keys found */ function getPublicKeysForKeyId(keyId) { var result = new Array(); diff --git a/src/packet/openpgp.packet.signature.js b/src/packet/openpgp.packet.signature.js index 744d2859..486e1860 100644 --- a/src/packet/openpgp.packet.signature.js +++ b/src/packet/openpgp.packet.signature.js @@ -477,9 +477,9 @@ function openpgp_packet_signature() { }; /** * verifys the signature packet. Note: not signature types are implemented - * @param data [String] data which on the signature applies - * @param key [openpgp_msg_privatekey] the public key to verify the signature - * @return + * @param {String} data data which on the signature applies + * @param {openpgp_msg_privatekey} key the public key to verify the signature + * @return {boolean} True if message is verified, else false. */ function verify(data, key) { switch(this.signatureType) {