mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 06:01:02 +01:00
Fixes the lint problems and add JSDoc
This commit is contained in:
parent
cfd9b16f8b
commit
7feafbf0e7
@ -16,12 +16,18 @@ import Checksum from "./Checksum.js";
|
|||||||
*/
|
*/
|
||||||
const Hash = {
|
const Hash = {
|
||||||
|
|
||||||
|
/** Generic hash function
|
||||||
|
*
|
||||||
|
* @param {string} name
|
||||||
|
* @param {string} input
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
runHash: function(name, input) {
|
runHash: function(name, input) {
|
||||||
var hasher = CryptoApi.hasher(name);
|
let hasher = CryptoApi.hasher(name);
|
||||||
hasher.state.message = input;
|
hasher.state.message = input;
|
||||||
hasher.state.length += input.length;
|
hasher.state.length += input.length;
|
||||||
hasher.process();
|
hasher.process();
|
||||||
return hasher.finalize().stringify('hex');
|
return hasher.finalize().stringify("hex");
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user