From a173a63b16bae3ff059222eba6146c498ab6f087 Mon Sep 17 00:00:00 2001 From: Sanjana Rajan Date: Fri, 19 Jan 2018 14:38:27 +0100 Subject: [PATCH] doc fixes --- src/crypto/signature.js | 2 +- src/packet/public_key_encrypted_session_key.js | 2 +- src/packet/secret_key.js | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/crypto/signature.js b/src/crypto/signature.js index d30d87c3..c233a8b2 100644 --- a/src/crypto/signature.js +++ b/src/crypto/signature.js @@ -87,7 +87,7 @@ export default { * Create a signature on data using the specified algorithm * @param {module:enums.hash} hash_algo hash Algorithm to use (See {@link http://tools.ietf.org/html/rfc4880#section-9.4|RFC 4880 9.4}) * @param {module:enums.publicKey} algo Asymmetric cipher algorithm to use (See {@link http://tools.ietf.org/html/rfc4880#section-9.1|RFC 4880 9.1}) - * @param {Array} publicMPIs Public followed by Private key multiprecision algorithm-specific parameters + * @param {Array} keyIntegers Public followed by Private key multiprecision algorithm-specific parameters * @param {Uint8Array} data Data to be signed * @return {Array} */ diff --git a/src/packet/public_key_encrypted_session_key.js b/src/packet/public_key_encrypted_session_key.js index b650f144..79672d8f 100644 --- a/src/packet/public_key_encrypted_session_key.js +++ b/src/packet/public_key_encrypted_session_key.js @@ -129,7 +129,7 @@ PublicKeyEncryptedSessionKey.prototype.encrypt = async function (key) { * packets (tag 1) * * @param {module:packet/secret_key} key - * Private key with secMPIs unlocked + * Private key with secret params unlocked * @return {String} The unencrypted session key */ PublicKeyEncryptedSessionKey.prototype.decrypt = async function (key) { diff --git a/src/packet/secret_key.js b/src/packet/secret_key.js index d2ed2d28..284d5c89 100644 --- a/src/packet/secret_key.js +++ b/src/packet/secret_key.js @@ -25,7 +25,7 @@ * @requires crypto * @requires enums * @requires packet/public_key - * @requires type/mpi + * @requires type/keyid * @requires type/s2k * @requires util * @module packet/secret_key @@ -95,7 +95,7 @@ function parse_cleartext_params(hash_algorithm, cleartext, algorithm) { for (var i = 0; i < types.length && p < cleartext.length; i++) { p += params[i].read(cleartext.subarray(p, cleartext.length)); if (p > cleartext.length) { - throw new Error('Error reading MPI @:' + p); + throw new Error('Error reading param @:' + p); } } @@ -205,13 +205,13 @@ function produceEncryptionKey(s2k, passphrase, algorithm) { } /** - * Decrypts the private key MPIs which are needed to use the key. + * Decrypts the private key params which are needed to use the key. * @link module:packet/secret_key.isDecrypted should be * false otherwise a call to this function is not needed * * @param {String} str_passphrase The passphrase for this private key * as string - * @return {Boolean} True if the passphrase was correct or MPI already + * @return {Boolean} True if the passphrase was correct or param already * decrypted; false if not */ SecretKey.prototype.decrypt = function (passphrase) { @@ -281,11 +281,11 @@ SecretKey.prototype.generate = function (bits, curve) { }; /** - * Clear private MPIs, return to initial state + * Clear private params, return to initial state */ SecretKey.prototype.clearPrivateParams = function () { if (!this.encrypted) { - throw new Error('If secret key is not encrypted, clearing private MPIs is irreversible.'); + throw new Error('If secret key is not encrypted, clearing private params is irreversible.'); } this.params = this.params.slice(0, crypto.getPubKeyParamTypes(this.algorithm).length); this.isDecrypted = false;