mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
ESM: Ported all Hash and Checksum operations
This commit is contained in:
parent
5362508a99
commit
3fd1f4e6d9
43 changed files with 1971 additions and 9 deletions
40
src/core/operations/MD4.mjs
Normal file
40
src/core/operations/MD4.mjs
Normal file
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
* @author n1474335 [n1474335@gmail.com]
|
||||
* @copyright Crown Copyright 2016
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import Operation from "../Operation";
|
||||
import {runHash} from "../lib/Hash";
|
||||
|
||||
/**
|
||||
* MD4 operation
|
||||
*/
|
||||
class MD4 extends Operation {
|
||||
|
||||
/**
|
||||
* MD4 constructor
|
||||
*/
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
this.name = "MD4";
|
||||
this.module = "Hashing";
|
||||
this.description = "The MD4 (Message-Digest 4) algorithm is a cryptographic hash function developed by Ronald Rivest in 1990. The digest length is 128 bits. The algorithm has influenced later designs, such as the MD5, SHA-1 and RIPEMD algorithms.<br><br>The security of MD4 has been severely compromised.";
|
||||
this.inputType = "ArrayBuffer";
|
||||
this.outputType = "string";
|
||||
this.args = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {ArrayBuffer} input
|
||||
* @param {Object[]} args
|
||||
* @returns {string}
|
||||
*/
|
||||
run(input, args) {
|
||||
return runHash("md4", input);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default MD4;
|
Loading…
Add table
Add a link
Reference in a new issue