2017-08-09 20:09:23 +01:00
|
|
|
import Cipher from "../../operations/Cipher.js";
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Ciphers module.
|
|
|
|
*
|
|
|
|
* Libraries:
|
|
|
|
* - CryptoJS
|
|
|
|
* - Blowfish
|
2018-01-01 16:09:58 +00:00
|
|
|
* - Forge
|
2017-08-09 20:09:23 +01:00
|
|
|
*
|
|
|
|
* @author n1474335 [n1474335@gmail.com]
|
|
|
|
* @copyright Crown Copyright 2017
|
|
|
|
* @license Apache-2.0
|
|
|
|
*/
|
2017-08-25 00:44:22 +01:00
|
|
|
let OpModules = typeof self === "undefined" ? {} : self.OpModules || {};
|
2017-08-09 20:09:23 +01:00
|
|
|
|
|
|
|
OpModules.Ciphers = {
|
|
|
|
"AES Encrypt": Cipher.runAesEnc,
|
|
|
|
"AES Decrypt": Cipher.runAesDec,
|
|
|
|
"Blowfish Encrypt": Cipher.runBlowfishEnc,
|
|
|
|
"Blowfish Decrypt": Cipher.runBlowfishDec,
|
|
|
|
"DES Encrypt": Cipher.runDesEnc,
|
|
|
|
"DES Decrypt": Cipher.runDesDec,
|
|
|
|
"Triple DES Encrypt": Cipher.runTripleDesEnc,
|
|
|
|
"Triple DES Decrypt": Cipher.runTripleDesDec,
|
|
|
|
"Derive PBKDF2 key": Cipher.runPbkdf2,
|
|
|
|
"Derive EVP key": Cipher.runEvpkdf,
|
|
|
|
"RC4": Cipher.runRc4,
|
|
|
|
"RC4 Drop": Cipher.runRc4drop,
|
2018-01-01 19:50:06 +00:00
|
|
|
"RC2 Encrypt": Cipher.runRc2Enc,
|
|
|
|
"RC2 Decrypt": Cipher.runRc2Dec,
|
2017-08-09 20:09:23 +01:00
|
|
|
"Vigenère Encode": Cipher.runVigenereEnc,
|
|
|
|
"Vigenère Decode": Cipher.runVigenereDec,
|
|
|
|
"Bifid Cipher Encode": Cipher.runBifidEnc,
|
|
|
|
"Bifid Cipher Decode": Cipher.runBifidDec,
|
|
|
|
"Affine Cipher Encode": Cipher.runAffineEnc,
|
|
|
|
"Affine Cipher Decode": Cipher.runAffineDec,
|
|
|
|
"Atbash Cipher": Cipher.runAtbash,
|
|
|
|
"Substitute": Cipher.runSubstitute,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default OpModules;
|