mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 22:21:01 +01:00
Added Streebog and GOST to 'Generate all hashes' op
This commit is contained in:
parent
4d4ebf7279
commit
e4b4e8afca
@ -31,6 +31,8 @@ import CRC16Checksum from "./CRC16Checksum";
|
|||||||
import CRC32Checksum from "./CRC32Checksum";
|
import CRC32Checksum from "./CRC32Checksum";
|
||||||
import BLAKE2b from "./BLAKE2b";
|
import BLAKE2b from "./BLAKE2b";
|
||||||
import BLAKE2s from "./BLAKE2s";
|
import BLAKE2s from "./BLAKE2s";
|
||||||
|
import Streebog from "./Streebog";
|
||||||
|
import GOSTHash from "./GOSTHash";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate all hashes operation
|
* Generate all hashes operation
|
||||||
@ -61,53 +63,56 @@ class GenerateAllHashes extends Operation {
|
|||||||
const arrayBuffer = input,
|
const arrayBuffer = input,
|
||||||
str = Utils.arrayBufferToStr(arrayBuffer, false),
|
str = Utils.arrayBufferToStr(arrayBuffer, false),
|
||||||
byteArray = new Uint8Array(arrayBuffer),
|
byteArray = new Uint8Array(arrayBuffer),
|
||||||
output = "MD2: " + (new MD2()).run(arrayBuffer, []) +
|
output = "MD2: " + (new MD2()).run(arrayBuffer, []) +
|
||||||
"\nMD4: " + (new MD4()).run(arrayBuffer, []) +
|
"\nMD4: " + (new MD4()).run(arrayBuffer, []) +
|
||||||
"\nMD5: " + (new MD5()).run(arrayBuffer, []) +
|
"\nMD5: " + (new MD5()).run(arrayBuffer, []) +
|
||||||
"\nMD6: " + (new MD6()).run(str, []) +
|
"\nMD6: " + (new MD6()).run(str, []) +
|
||||||
"\nSHA0: " + (new SHA0()).run(arrayBuffer, []) +
|
"\nSHA0: " + (new SHA0()).run(arrayBuffer, []) +
|
||||||
"\nSHA1: " + (new SHA1()).run(arrayBuffer, []) +
|
"\nSHA1: " + (new SHA1()).run(arrayBuffer, []) +
|
||||||
"\nSHA2 224: " + (new SHA2()).run(arrayBuffer, ["224"]) +
|
"\nSHA2 224: " + (new SHA2()).run(arrayBuffer, ["224"]) +
|
||||||
"\nSHA2 256: " + (new SHA2()).run(arrayBuffer, ["256"]) +
|
"\nSHA2 256: " + (new SHA2()).run(arrayBuffer, ["256"]) +
|
||||||
"\nSHA2 384: " + (new SHA2()).run(arrayBuffer, ["384"]) +
|
"\nSHA2 384: " + (new SHA2()).run(arrayBuffer, ["384"]) +
|
||||||
"\nSHA2 512: " + (new SHA2()).run(arrayBuffer, ["512"]) +
|
"\nSHA2 512: " + (new SHA2()).run(arrayBuffer, ["512"]) +
|
||||||
"\nSHA3 224: " + (new SHA3()).run(arrayBuffer, ["224"]) +
|
"\nSHA3 224: " + (new SHA3()).run(arrayBuffer, ["224"]) +
|
||||||
"\nSHA3 256: " + (new SHA3()).run(arrayBuffer, ["256"]) +
|
"\nSHA3 256: " + (new SHA3()).run(arrayBuffer, ["256"]) +
|
||||||
"\nSHA3 384: " + (new SHA3()).run(arrayBuffer, ["384"]) +
|
"\nSHA3 384: " + (new SHA3()).run(arrayBuffer, ["384"]) +
|
||||||
"\nSHA3 512: " + (new SHA3()).run(arrayBuffer, ["512"]) +
|
"\nSHA3 512: " + (new SHA3()).run(arrayBuffer, ["512"]) +
|
||||||
"\nKeccak 224: " + (new Keccak()).run(arrayBuffer, ["224"]) +
|
"\nKeccak 224: " + (new Keccak()).run(arrayBuffer, ["224"]) +
|
||||||
"\nKeccak 256: " + (new Keccak()).run(arrayBuffer, ["256"]) +
|
"\nKeccak 256: " + (new Keccak()).run(arrayBuffer, ["256"]) +
|
||||||
"\nKeccak 384: " + (new Keccak()).run(arrayBuffer, ["384"]) +
|
"\nKeccak 384: " + (new Keccak()).run(arrayBuffer, ["384"]) +
|
||||||
"\nKeccak 512: " + (new Keccak()).run(arrayBuffer, ["512"]) +
|
"\nKeccak 512: " + (new Keccak()).run(arrayBuffer, ["512"]) +
|
||||||
"\nShake 128: " + (new Shake()).run(arrayBuffer, ["128", 256]) +
|
"\nShake 128: " + (new Shake()).run(arrayBuffer, ["128", 256]) +
|
||||||
"\nShake 256: " + (new Shake()).run(arrayBuffer, ["256", 512]) +
|
"\nShake 256: " + (new Shake()).run(arrayBuffer, ["256", 512]) +
|
||||||
"\nRIPEMD-128: " + (new RIPEMD()).run(arrayBuffer, ["128"]) +
|
"\nRIPEMD-128: " + (new RIPEMD()).run(arrayBuffer, ["128"]) +
|
||||||
"\nRIPEMD-160: " + (new RIPEMD()).run(arrayBuffer, ["160"]) +
|
"\nRIPEMD-160: " + (new RIPEMD()).run(arrayBuffer, ["160"]) +
|
||||||
"\nRIPEMD-256: " + (new RIPEMD()).run(arrayBuffer, ["256"]) +
|
"\nRIPEMD-256: " + (new RIPEMD()).run(arrayBuffer, ["256"]) +
|
||||||
"\nRIPEMD-320: " + (new RIPEMD()).run(arrayBuffer, ["320"]) +
|
"\nRIPEMD-320: " + (new RIPEMD()).run(arrayBuffer, ["320"]) +
|
||||||
"\nHAS-160: " + (new HAS160()).run(arrayBuffer, []) +
|
"\nHAS-160: " + (new HAS160()).run(arrayBuffer, []) +
|
||||||
"\nWhirlpool-0: " + (new Whirlpool()).run(arrayBuffer, ["Whirlpool-0"]) +
|
"\nWhirlpool-0: " + (new Whirlpool()).run(arrayBuffer, ["Whirlpool-0"]) +
|
||||||
"\nWhirlpool-T: " + (new Whirlpool()).run(arrayBuffer, ["Whirlpool-T"]) +
|
"\nWhirlpool-T: " + (new Whirlpool()).run(arrayBuffer, ["Whirlpool-T"]) +
|
||||||
"\nWhirlpool: " + (new Whirlpool()).run(arrayBuffer, ["Whirlpool"]) +
|
"\nWhirlpool: " + (new Whirlpool()).run(arrayBuffer, ["Whirlpool"]) +
|
||||||
"\nBLAKE2b-128: " + (new BLAKE2b).run(arrayBuffer, ["128", "Hex", {string: "", option: "UTF8"}]) +
|
"\nBLAKE2b-128: " + (new BLAKE2b).run(arrayBuffer, ["128", "Hex", {string: "", option: "UTF8"}]) +
|
||||||
"\nBLAKE2b-160: " + (new BLAKE2b).run(arrayBuffer, ["160", "Hex", {string: "", option: "UTF8"}]) +
|
"\nBLAKE2b-160: " + (new BLAKE2b).run(arrayBuffer, ["160", "Hex", {string: "", option: "UTF8"}]) +
|
||||||
"\nBLAKE2b-256: " + (new BLAKE2b).run(arrayBuffer, ["256", "Hex", {string: "", option: "UTF8"}]) +
|
"\nBLAKE2b-256: " + (new BLAKE2b).run(arrayBuffer, ["256", "Hex", {string: "", option: "UTF8"}]) +
|
||||||
"\nBLAKE2b-384: " + (new BLAKE2b).run(arrayBuffer, ["384", "Hex", {string: "", option: "UTF8"}]) +
|
"\nBLAKE2b-384: " + (new BLAKE2b).run(arrayBuffer, ["384", "Hex", {string: "", option: "UTF8"}]) +
|
||||||
"\nBLAKE2b-512: " + (new BLAKE2b).run(arrayBuffer, ["512", "Hex", {string: "", option: "UTF8"}]) +
|
"\nBLAKE2b-512: " + (new BLAKE2b).run(arrayBuffer, ["512", "Hex", {string: "", option: "UTF8"}]) +
|
||||||
"\nBLAKE2s-128: " + (new BLAKE2s).run(arrayBuffer, ["128", "Hex", {string: "", option: "UTF8"}]) +
|
"\nBLAKE2s-128: " + (new BLAKE2s).run(arrayBuffer, ["128", "Hex", {string: "", option: "UTF8"}]) +
|
||||||
"\nBLAKE2s-160: " + (new BLAKE2s).run(arrayBuffer, ["160", "Hex", {string: "", option: "UTF8"}]) +
|
"\nBLAKE2s-160: " + (new BLAKE2s).run(arrayBuffer, ["160", "Hex", {string: "", option: "UTF8"}]) +
|
||||||
"\nBLAKE2s-256: " + (new BLAKE2s).run(arrayBuffer, ["256", "Hex", {string: "", option: "UTF8"}]) +
|
"\nBLAKE2s-256: " + (new BLAKE2s).run(arrayBuffer, ["256", "Hex", {string: "", option: "UTF8"}]) +
|
||||||
"\nSSDEEP: " + (new SSDEEP()).run(str) +
|
"\nStreebog-256: " + (new Streebog).run(arrayBuffer, ["256"]) +
|
||||||
"\nCTPH: " + (new CTPH()).run(str) +
|
"\nStreebog-512: " + (new Streebog).run(arrayBuffer, ["512"]) +
|
||||||
|
"\nGOST: " + (new GOSTHash).run(arrayBuffer, ["D-A"]) +
|
||||||
|
"\nSSDEEP: " + (new SSDEEP()).run(str) +
|
||||||
|
"\nCTPH: " + (new CTPH()).run(str) +
|
||||||
"\n\nChecksums:" +
|
"\n\nChecksums:" +
|
||||||
"\nFletcher-8: " + (new Fletcher8Checksum).run(byteArray, []) +
|
"\nFletcher-8: " + (new Fletcher8Checksum).run(byteArray, []) +
|
||||||
"\nFletcher-16: " + (new Fletcher16Checksum).run(byteArray, []) +
|
"\nFletcher-16: " + (new Fletcher16Checksum).run(byteArray, []) +
|
||||||
"\nFletcher-32: " + (new Fletcher32Checksum).run(byteArray, []) +
|
"\nFletcher-32: " + (new Fletcher32Checksum).run(byteArray, []) +
|
||||||
"\nFletcher-64: " + (new Fletcher64Checksum).run(byteArray, []) +
|
"\nFletcher-64: " + (new Fletcher64Checksum).run(byteArray, []) +
|
||||||
"\nAdler-32: " + (new Adler32Checksum).run(byteArray, []) +
|
"\nAdler-32: " + (new Adler32Checksum).run(byteArray, []) +
|
||||||
"\nCRC-8: " + (new CRC8Checksum).run(arrayBuffer, ["CRC-8"]) +
|
"\nCRC-8: " + (new CRC8Checksum).run(arrayBuffer, ["CRC-8"]) +
|
||||||
"\nCRC-16: " + (new CRC16Checksum).run(arrayBuffer, []) +
|
"\nCRC-16: " + (new CRC16Checksum).run(arrayBuffer, []) +
|
||||||
"\nCRC-32: " + (new CRC32Checksum).run(arrayBuffer, []);
|
"\nCRC-32: " + (new CRC32Checksum).run(arrayBuffer, []);
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user