2017-08-09 21:09:23 +02:00
|
|
|
import Checksum from "../../operations/Checksum.js";
|
|
|
|
import Hash from "../../operations/Hash.js";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Hashing module.
|
|
|
|
*
|
|
|
|
* Libraries:
|
|
|
|
* - CryptoApi
|
2017-09-17 15:53:17 +02:00
|
|
|
* - node-md6
|
|
|
|
* - js-sha3
|
2017-08-09 21:09:23 +02:00
|
|
|
* - ./Checksum.js
|
|
|
|
*
|
|
|
|
* @author n1474335 [n1474335@gmail.com]
|
|
|
|
* @copyright Crown Copyright 2017
|
|
|
|
* @license Apache-2.0
|
|
|
|
*/
|
2017-08-25 01:44:22 +02:00
|
|
|
let OpModules = typeof self === "undefined" ? {} : self.OpModules || {};
|
2017-08-09 21:09:23 +02:00
|
|
|
|
|
|
|
OpModules.Hashing = {
|
|
|
|
"Analyse hash": Hash.runAnalyse,
|
|
|
|
"Generate all hashes": Hash.runAll,
|
|
|
|
"MD2": Hash.runMD2,
|
|
|
|
"MD4": Hash.runMD4,
|
|
|
|
"MD5": Hash.runMD5,
|
2017-09-17 15:53:17 +02:00
|
|
|
"MD6": Hash.runMD6,
|
2017-08-09 21:09:23 +02:00
|
|
|
"SHA0": Hash.runSHA0,
|
|
|
|
"SHA1": Hash.runSHA1,
|
2017-09-17 15:53:17 +02:00
|
|
|
"SHA2": Hash.runSHA2,
|
2017-08-09 21:09:23 +02:00
|
|
|
"SHA3": Hash.runSHA3,
|
2017-09-17 15:53:17 +02:00
|
|
|
"Keccak": Hash.runKeccak,
|
|
|
|
"Shake": Hash.runShake,
|
|
|
|
"RIPEMD": Hash.runRIPEMD,
|
2017-09-22 19:01:39 +02:00
|
|
|
"HAS-160": Hash.runHAS,
|
|
|
|
"Whirlpool": Hash.runWhirlpool,
|
2017-08-09 21:09:23 +02:00
|
|
|
"HMAC": Hash.runHMAC,
|
|
|
|
"Fletcher-8 Checksum": Checksum.runFletcher8,
|
|
|
|
"Fletcher-16 Checksum": Checksum.runFletcher16,
|
|
|
|
"Fletcher-32 Checksum": Checksum.runFletcher32,
|
|
|
|
"Fletcher-64 Checksum": Checksum.runFletcher64,
|
|
|
|
"Adler-32 Checksum": Checksum.runAdler32,
|
2017-09-17 15:53:17 +02:00
|
|
|
"CRC-16 Checksum": Checksum.runCRC16,
|
2017-08-09 21:09:23 +02:00
|
|
|
"CRC-32 Checksum": Checksum.runCRC32,
|
|
|
|
"TCP/IP Checksum": Checksum.runTCPIP,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default OpModules;
|