mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-16 17:08:31 +01:00
Cleaned lint.
This commit is contained in:
parent
7feafbf0e7
commit
0e3751407b
1 changed files with 4 additions and 2 deletions
|
@ -16,20 +16,22 @@ import Checksum from "./Checksum.js";
|
||||||
*/
|
*/
|
||||||
const Hash = {
|
const Hash = {
|
||||||
|
|
||||||
/** Generic hash function
|
/**
|
||||||
|
* Generic hash function.
|
||||||
*
|
*
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
* @param {string} input
|
* @param {string} input
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
runHash: function(name, input) {
|
runHash: function(name, input) {
|
||||||
let hasher = CryptoApi.hasher(name);
|
const 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");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MD2 operation.
|
* MD2 operation.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue