mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Option structures added for hashing algorithms
This commit is contained in:
parent
4c3324aea1
commit
57c1a03c4f
7 changed files with 100 additions and 14 deletions
|
@ -20,11 +20,17 @@ class SHA0 extends Operation {
|
|||
|
||||
this.name = "SHA0";
|
||||
this.module = "Crypto";
|
||||
this.description = "SHA-0 is a retronym applied to the original version of the 160-bit hash function published in 1993 under the name 'SHA'. It was withdrawn shortly after publication due to an undisclosed 'significant flaw' and replaced by the slightly revised version SHA-1.";
|
||||
this.description = "SHA-0 is a retronym applied to the original version of the 160-bit hash function published in 1993 under the name 'SHA'. It was withdrawn shortly after publication due to an undisclosed 'significant flaw' and replaced by the slightly revised version SHA-1. The message digest algorithm consists, by default, of 80 rounds.";
|
||||
this.infoURL = "https://wikipedia.org/wiki/SHA-1#SHA-0";
|
||||
this.inputType = "ArrayBuffer";
|
||||
this.outputType = "string";
|
||||
this.args = [];
|
||||
this.args = [
|
||||
{
|
||||
name: "Rounds",
|
||||
type: "number",
|
||||
value: 80
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,7 +39,7 @@ class SHA0 extends Operation {
|
|||
* @returns {string}
|
||||
*/
|
||||
run(input, args) {
|
||||
return runHash("sha0", input);
|
||||
return runHash("sha0", input, {rounds: args[0]});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue