Updated eslint whitespace rules

This commit is contained in:
n1474335 2017-02-09 15:09:33 +00:00
parent ebf2258715
commit e803d208e8
51 changed files with 801 additions and 793 deletions

View file

@ -34,7 +34,7 @@ var Hash = {
return Utils.toHexFast(CryptoApi.hash("md4", input, {}));
},
/**
* MD5 operation.
*
@ -58,8 +58,8 @@ var Hash = {
runSHA0: function (input, args) {
return Utils.toHexFast(CryptoApi.hash("sha0", input, {}));
},
/**
* SHA1 operation.
*
@ -72,7 +72,7 @@ var Hash = {
return CryptoJS.SHA1(input).toString(CryptoJS.enc.Hex);
},
/**
* SHA224 operation.
*
@ -84,8 +84,8 @@ var Hash = {
input = CryptoJS.enc.Latin1.parse(input);
return CryptoJS.SHA224(input).toString(CryptoJS.enc.Hex);
},
/**
* SHA256 operation.
*
@ -97,8 +97,8 @@ var Hash = {
input = CryptoJS.enc.Latin1.parse(input);
return CryptoJS.SHA256(input).toString(CryptoJS.enc.Hex);
},
/**
* SHA384 operation.
*
@ -110,8 +110,8 @@ var Hash = {
input = CryptoJS.enc.Latin1.parse(input);
return CryptoJS.SHA384(input).toString(CryptoJS.enc.Hex);
},
/**
* SHA512 operation.
*
@ -123,14 +123,14 @@ var Hash = {
input = CryptoJS.enc.Latin1.parse(input);
return CryptoJS.SHA512(input).toString(CryptoJS.enc.Hex);
},
/**
* @constant
* @default
*/
SHA3_LENGTH: ["512", "384", "256", "224"],
/**
* SHA3 operation.
*
@ -146,8 +146,8 @@ var Hash = {
};
return CryptoJS.SHA3(input, options).toString(CryptoJS.enc.Hex);
},
/**
* RIPEMD-160 operation.
*
@ -160,13 +160,13 @@ var Hash = {
return CryptoJS.RIPEMD160(input).toString(CryptoJS.enc.Hex);
},
/**
* @constant
* @default
*/
HMAC_FUNCTIONS: ["MD5", "SHA1", "SHA224", "SHA256", "SHA384", "SHA512", "SHA3", "RIPEMD-160"],
/**
* HMAC operation.
*
@ -189,8 +189,8 @@ var Hash = {
};
return execute[hashFunc].toString(CryptoJS.enc.Hex);
},
/**
* Generate all hashes operation.
*
@ -221,11 +221,11 @@ var Hash = {
"\nFletcher-64: " + Checksum.runFletcher64(byteArray, []) +
"\nAdler-32: " + Checksum.runAdler32(byteArray, []) +
"\nCRC-32: " + Checksum.runCRC32(byteArray, []);
return output;
},
/**
* Analyse hash operation.
*
@ -235,21 +235,21 @@ var Hash = {
*/
runAnalyse: function(input, args) {
input = input.replace(/\s/g, "");
var output = "",
byteLength = input.length / 2,
bitLength = byteLength * 8,
possibleHashFunctions = [];
if (!/^[a-f0-9]+$/i.test(input)) {
return "Invalid hash";
}
output += "Hash length: " + input.length + "\n" +
"Byte length: " + byteLength + "\n" +
"Bit length: " + bitLength + "\n\n" +
"Based on the length, this hash could have been generated by one of the following hashing functions:\n";
switch (bitLength) {
case 4:
possibleHashFunctions = [
@ -376,8 +376,8 @@ var Hash = {
];
break;
}
return output + possibleHashFunctions.join("\n");
},
};