diff --git a/src/core/operations/Hash.js b/src/core/operations/Hash.js index d297c624..7213cb13 100755 --- a/src/core/operations/Hash.js +++ b/src/core/operations/Hash.js @@ -16,12 +16,18 @@ import Checksum from "./Checksum.js"; */ const Hash = { + /** Generic hash function + * + * @param {string} name + * @param {string} input + * @returns {string} + */ runHash: function(name, input) { - var hasher = CryptoApi.hasher(name); + let hasher = CryptoApi.hasher(name); hasher.state.message = input; hasher.state.length += input.length; hasher.process(); - return hasher.finalize().stringify('hex'); + return hasher.finalize().stringify("hex"); }, /**