Cipher operations.
- Copyright:
-
- Crown Copyright 2016
- License:
-
- Apache-2.0
- Source:
Members
-
<static, constant> IO_FORMAT1
-
- Default Value:
-
- ["Hex","Base64","UTF8","UTF16","UTF16LE","UTF16BE","Latin1"]
- Source:
-
<static, constant> IO_FORMAT2
-
- Default Value:
-
- ["UTF8","UTF16","UTF16LE","UTF16BE","Latin1","Hex","Base64"]
- Source:
-
<static, constant> IO_FORMAT3
-
- Default Value:
-
- ["Hex","Base64","UTF16","UTF16LE","UTF16BE","Latin1"]
- Source:
-
<static, constant> IO_FORMAT4
-
- Default Value:
-
- ["Latin1","UTF8","UTF16","UTF16LE","UTF16BE","Hex","Base64"]
- Source:
-
<static, constant> MODES
-
- Default Value:
-
- ["CBC","CFB","CTR","OFB","ECB"]
- Source:
-
<static, constant> PADDING
-
- Default Value:
-
- ["Pkcs7","Iso97971","AnsiX923","Iso10126","ZeroPadding","NoPadding"]
- Source:
-
<static, constant> RESULT_TYPE
-
- Default Value:
-
- ["Show all","Ciphertext","Key","IV","Salt"]
- Source:
-
<static, constant> BLOWFISH_MODES
-
- Default Value:
-
- ["ECB","CBC","PCBC","CFB","OFB","CTR"]
- Source:
-
<static, constant> BLOWFISH_OUTPUT_TYPES
-
- Default Value:
-
- ["Base64","Hex","String","Raw"]
- Source:
-
<static, constant> KDF_KEY_SIZE
-
- Default Value:
-
- 256
- Source:
-
<static, constant> KDF_ITERATIONS
-
- Default Value:
-
- 1
- Source:
-
<static, constant> RC4DROP_BYTES
-
- Default Value:
-
- 768
- Source:
Methods
-
<private, static> _enc(algo, input, args)
-
Runs encryption operations using the CryptoJS framework.
Parameters:
Name Type Description algo
function The CryptoJS algorithm to use
input
byte_array args
function - Source:
Returns:
- Type
- string
-
<private, static> _dec(algo, input, args)
-
Runs decryption operations using the CryptoJS framework.
Parameters:
Name Type Description algo
function The CryptoJS algorithm to use
input
byte_array args
function - Source:
Returns:
- Type
- string
-
<static> run_aes_enc(input, args)
-
AES Encrypt operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_aes_dec(input, args)
-
AES Decrypt operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_des_enc(input, args)
-
DES Encrypt operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_des_dec(input, args)
-
DES Decrypt operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_triple_des_enc(input, args)
-
Triple DES Encrypt operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_triple_des_dec(input, args)
-
Triple DES Decrypt operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_rabbit_enc(input, args)
-
Rabbit Encrypt operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_rabbit_dec(input, args)
-
Rabbit Decrypt operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_blowfish_enc(input, args)
-
Blowfish Encrypt operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_blowfish_dec(input, args)
-
Blowfish Decrypt operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_pbkdf2(input, args)
-
Derive PBKDF2 key operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_evpkdf(input, args)
-
Derive EVP key operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_rc4(input, args)
-
RC4 operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_rc4drop(input, args)
-
RC4 Drop operation.
Parameters:
Name Type Description input
string args
Array.<Object> - Source:
Returns:
- Type
- string