Comments & code style

This commit is contained in:
Daniel Huigens
2018-07-05 13:44:33 +02:00
parent 1101a05b10
commit ca537e439d
21 changed files with 354 additions and 171 deletions

View File

@@ -29,6 +29,7 @@ import Curve from './curves';
* @param {module:enums.hash} hash_algo Hash algorithm used to sign
* @param {Uint8Array} m Message to sign
* @param {Uint8Array} d Private key used to sign the message
* @param {Uint8Array} hashed The hashed message
* @returns {{r: Uint8Array,
* s: Uint8Array}} Signature of the message
* @async
@@ -49,6 +50,7 @@ async function sign(oid, hash_algo, m, d, hashed) {
s: Uint8Array}} signature Signature to verify
* @param {Uint8Array} m Message to verify
* @param {Uint8Array} Q Public key used to verify the message
* @param {Uint8Array} hashed The hashed message
* @returns {Boolean}
* @async
*/

View File

@@ -29,6 +29,7 @@ import Curve from './curves';
* @param {module:enums.hash} hash_algo Hash algorithm used to sign
* @param {Uint8Array} m Message to sign
* @param {Uint8Array} d Private key used to sign
* @param {Uint8Array} hashed The hashed message
* @returns {{R: Uint8Array,
* S: Uint8Array}} Signature of the message
* @async
@@ -50,6 +51,7 @@ async function sign(oid, hash_algo, m, d, hashed) {
S: Uint8Array}} signature Signature to verify the message
* @param {Uint8Array} m Message to verify
* @param {Uint8Array} Q Public key used to verify the message
* @param {Uint8Array} hashed The hashed message
* @returns {Boolean}
* @async
*/

View File

@@ -25,6 +25,7 @@ export default {
* @param {Array<module:type/mpi>} msg_MPIs Algorithm-specific signature parameters
* @param {Array<module:type/mpi>} pub_MPIs Algorithm-specific public key parameters
* @param {Uint8Array} data Data for which the signature was created
* @param {Uint8Array} hashed The hashed data
* @returns {Boolean} True if signature is valid
* @async
*/
@@ -78,6 +79,7 @@ export default {
* @param {module:enums.hash} hash_algo Hash algorithm
* @param {Array<module:type/mpi>} key_params Algorithm-specific public and private key parameters
* @param {Uint8Array} data Data to be signed
* @param {Uint8Array} hashed The hashed data
* @returns {Uint8Array} Signature
* @async
*/