Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jshashes

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jshashes - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

.npmignore

116

bin/hashes.js

@@ -1,16 +0,14 @@

#!/urs/bin/env node
#!/usr/bin/env node
/**
* Simple CLI to simplify common tasks :)
* @beta
*/
var Hashes = require('../hashes'),
args = process.argv,
version = '1.0.3',
usage, options;
// Exit the process with a message
function die (str) {
console.log(str);
process.exit();
}
// Usage dialog
usage = [
'jsHashes 1.0.2'
'jsHashes ' + version
, ''

@@ -21,39 +19,87 @@ , 'Usage:'

, 'Options:'
, ' md5 Calculates an hexadecimal MD5 hash from a given string'
, ' sha1 Host name or IP to bind the server to (default: localhost)'
, ' sha256 Port to bind the server to (default: 4000)'
, ' sha512 Number of worker processes to start (default: 1)'
, ' ripe Sets the log level to output debug messages to'
, ' b64e Base64 encoding'
, ' b64d Base64 decoding'
, ' crc CRC32 calculation'
, ' md5-hex'
, ' md5-b64'
, ' sha1-hex'
, ' sha1-hex'
, ' sha256-hex'
, ' sha256-b64'
, ' sha512-hex'
, ' sha512-b64'
, ' rmd160-hex'
, ' rmd160-b64'
, ' b64-enc'
, ' b64-dec'
, ' crc32'
, ''
, 'Help:'
, ' -h , elp help'
, ' -h , --help, help'
, ''
, 'Example:'
, ' $ hashes md5 "sample text!"'
, ' $ node hashes md5 "sample text!"'
, 'Current version:'
, ' -v , --version, version'
, ''
, 'Examples:'
, ' $ hashes sha1-hex "sample text!"'
, ' $ node hashes sha1-hex "sample text!"'
, ''
].join('\n');
options = [
'md5',
'sha1',
'sha256',
'sha512',
'ripe',
'b64e',
'b64d',
'crc'
'md5-hex'
,'md5-b64'
,'sha1-hex'
,'sha1-hex'
,'sha256-hex'
,'sha256-b64'
,'sha512-hex'
,'sha512-b64'
,'rmd160-hex'
,'rmd160-b64'
,'b64-enc'
,'b64-dec'
,'crc32'
];
if (args[0] === 'node') {
// Exit the process with a message
function die (str) {
console.log(str);
process.exit();
}
// process algorithm
function procesAlgorithm() {
var algorithm = args[0].split('-')[0].toUpperCase(),
encoding = args[0].split('-')[1],
string = args.slice(1).join(''),
instance, output;
if (algorithm === 'B64') {
algorithm = 'Base64';
encoding = encoding === 'dec' ? 'decode' : 'encode';
}
if (Hashes.hasOwnProperty(algorithm)) {
if (algorithm === 'CRC32') {
output = Hashes[algorithm](string);
} else {
instance = new Hashes[algorithm];
if (instance.hasOwnProperty(encoding)) {
output = instance[encoding](string);
}
}
} else {
output = 'Algorithm not supported. Type help to see the list of available options.'
}
return output;
}
if (args[0] && args[0].indexOf('node') !== -1) {
args = args.slice(2);
}
args.forEach(function (val, index) {
console.log(index + ' : ' + val);
});
if (args[0] === '-h' || args[0] === '--help' || args[0] === 'help') {
if (args[0] === '-v' || args[0] === '--version' || args[0] === 'version') {
die(version);
}
if (args[0] === '-h' || args[0] === '--help' || args[0] === 'help' || args.length < 2 || options.indexOf(args[0]) === -1) {
die(usage);
}
}
die(procesAlgorithm());
{
"name": "jsHashes",
"version": "1.0.2",
"version": "1.0.3",
"main": "hashes.js",

@@ -5,0 +5,0 @@ "ignore": [

/**
* jsHashes - A fast and independent hashing library pure JavaScript implemented (ES5 compliant) for both server and client side
* jsHashes - A fast and independent hashing library pure JavaScript implemented (ES3 compliant) for both server and client side
*

@@ -7,3 +7,3 @@ * @class Hashes

* @license New BSD (see LICENSE file)
* @version 1.0.2 - 25/03/2013
* @version 1.0.3
*

@@ -14,5 +14,5 @@ * Algorithms specification:

* RIPEMD-160 <http://homes.esat.kuleuven.be/~bosselae/ripemd160.html>
* SHA1 <http://homes.esat.kuleuven.be/~bosselae/ripemd160.html>
* SHA256 <http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf>
* SHA512 <http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf>
* SHA1 <http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf>
* SHA256 <http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf>
* SHA512 <http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf>
* HMAC <http://www.ietf.org/rfc/rfc2104.txt>

@@ -25,28 +25,32 @@ *

// private helper methods
function utf8Encode(input) {
var x, y, output = '', i = -1, l = input.length;
while (i+=1 < l) {
/* Decode utf-16 surrogate pairs */
x = input.charCodeAt(i);
y = i + 1 < l ? input.charCodeAt(i + 1) : 0;
if (0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) {
x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
i += 1;
function utf8Encode(str) {
var x, y, output = '', i = -1, l;
if (str && str.length) {
l = str.length;
while ((i+=1) < l) {
/* Decode utf-16 surrogate pairs */
x = str.charCodeAt(i);
y = i + 1 < l ? str.charCodeAt(i + 1) : 0;
if (0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF) {
x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);
i += 1;
}
/* Encode output as utf-8 */
if (x <= 0x7F) {
output += String.fromCharCode(x);
} else if (x <= 0x7FF) {
output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
0x80 | ( x & 0x3F));
} else if (x <= 0xFFFF) {
output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));
} else if (x <= 0x1FFFFF) {
output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
0x80 | ((x >>> 12) & 0x3F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));
}
}
/* Encode output as utf-8 */
if (x <= 0x7F) {
output += String.fromCharCode(x);
} else if (x <= 0x7FF) {
output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
0x80 | ( x & 0x3F));
} else if (x <= 0xFFFF) {
output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));
} else if (x <= 0x1FFFFF) {
output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
0x80 | ((x >>> 12) & 0x3F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));
}
}

@@ -56,23 +60,27 @@ return output;

function utf8Decode(str_data) {
var i, ac, c1, c2, c3, arr = [], l = str_data.length;
function utf8Decode(str) {
var i, ac, c1, c2, c3, arr = [], l;
i = ac = c1 = c2 = c3 = 0;
str_data += '';
while (i < l) {
c1 = str_data.charCodeAt(i);
ac += 1;
if (c1 < 128) {
arr[ac] = String.fromCharCode(c1);
i+=1;
} else if (c1 > 191 && c1 < 224) {
c2 = str_data.charCodeAt(i + 1);
arr[ac] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));
i += 2;
} else {
c2 = str_data.charCodeAt(i + 1);
c3 = str_data.charCodeAt(i + 2);
arr[ac] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
if (str && str.length) {
l = str.length;
str += '';
while (i < l) {
c1 = str.charCodeAt(i);
ac += 1;
if (c1 < 128) {
arr[ac] = String.fromCharCode(c1);
i+=1;
} else if (c1 > 191 && c1 < 224) {
c2 = str.charCodeAt(i + 1);
arr[ac] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));
i += 2;
} else {
c2 = str.charCodeAt(i + 1);
c3 = str.charCodeAt(i + 2);
arr[ac] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
}

@@ -257,2 +265,7 @@ return arr.join('');

Hashes = {
/**
* @property {String} version
* @readonly
*/
VERSION : '1.0.3',
/**

@@ -361,3 +374,3 @@ * @member Hashes

CRC32 : function (str) {
var crc = 0, x = 0, y = 0, table, i;
var crc = 0, x = 0, y = 0, table, i, iTop;
str = utf8Encode(str);

@@ -400,3 +413,4 @@

}
return crc ^ (-1);
// always return a positive number (that's what >>> 0 does)
return (crc ^ (-1)) >>> 0;
},

@@ -497,3 +511,3 @@ /**

function rstr_hmac(key, data) {
var bkey, ipad, hash, i;
var bkey, ipad, opad, hash, i;

@@ -728,3 +742,3 @@ key = (utf8) ? utf8Encode(key) : key;

function rstr_hmac(key, data) {
var bkey, ipad, i, hash;
var bkey, ipad, opad, i, hash;
key = (utf8) ? utf8Encode(key) : key;

@@ -1135,3 +1149,3 @@ data = (utf8) ? utf8Encode(data) : data;

var j, i, l,
W = new Array(80);
W = new Array(80),
hash = new Array(16),

@@ -1517,3 +1531,3 @@ //Initial hash values

function binl2rstr(input) {
var i, output = '', l = input.length * 3;
var i, output = '', l = input.length * 32;
for (i = 0; i < l; i += 8) {

@@ -1535,4 +1549,4 @@ output += String.fromCharCode((input[i>>5] >>> (i % 32)) & 0xFF);

h4 = 0xc3d2e1f0,
A1 = h0, B1 = h1, C1 = h2, D1 = h3, E1 = h4,
A2 = h0, B2 = h1, C2 = h2, D2 = h3, E2 = h4;
A1, B1, C1, D1, E1,
A2, B2, C2, D2, E2;

@@ -1545,2 +1559,3 @@ /* append padding */

for (i = 0; i < l; i+=16) {
A1 = A2 = h0; B1 = B2 = h1; C1 = C2 = h2; D1 = D2 = h3; E1 = E2 = h4;
for (j = 0; j <= 79; j+=1) {

@@ -1547,0 +1562,0 @@ T = safe_add(A1, rmd160_f(j, B1, C1, D1));

/*
jsHashes (minimized and closure compiled version)
@version 1.0.2 - 25/03/2013
@version 1.0.3
@license New BSD License
@see <https://github.com/h2non/jsHashes>
*/
(function(){function C(l){for(var k,t,m="",j=-1,u=l.length;j+=1<u;)k=l.charCodeAt(j),t=j+1<u?l.charCodeAt(j+1):0,55296<=k&&(56319>=k&&56320<=t&&57343>=t)&&(k=65536+((k&1023)<<10)+(t&1023),j+=1),127>=k?m+=String.fromCharCode(k):2047>=k?m+=String.fromCharCode(192|k>>>6&31,128|k&63):65535>=k?m+=String.fromCharCode(224|k>>>12&15,128|k>>>6&63,128|k&63):2097151>=k&&(m+=String.fromCharCode(240|k>>>18&7,128|k>>>12&63,128|k>>>6&63,128|k&63));return m}function x(l,k){var t=(l&65535)+(k&65535);return(l>>16)+(k>>16)+(t>>16)<<16|t&65535}function P(l,k){return l<<k|l>>>32-k}function E(l,k){for(var t=k?"0123456789ABCDEF":"0123456789abcdef",m="",j,u=0,w=l.length;u<w;u+=1)j=l.charCodeAt(u),m+=t.charAt(j>>>4&15)+t.charAt(j&15);return m}function L(l){var k,t=32*l.length,m="";for(k=0;k<t;k+=8)m+=String.fromCharCode(l[k>>5]>>>24-k%32&255);return m}function R(l){var k,t=32*l.length,m="";for(k=0;k<t;k+=8)m+=String.fromCharCode(l[k>>5]>>>k%32&255);return m}function K(l){var k,t=8*l.length,m=Array(l.length>>2),j=m.length;for(k=0;k<j;k+=1)m[k]=0;for(k=0;k<t;k+=8)m[k>>5]|=(l.charCodeAt(k/8)&255)<<k%32;return m}function J(l){var k,t=8*l.length,m=Array(l.length>>2),j=m.length;for(k=0;k<j;k+=1)m[k]=0;for(k=0;k<t;k+=8)m[k>>5]|=(l.charCodeAt(k/8)&255)<<24-k%32;return m}function G(l,k){var t=k.length,m=[],j,u,w,y,z;z=Array(Math.ceil(l.length/2));u=z.length;for(j=0;j<u;j+=1)z[j]=l.charCodeAt(2*j)<<8|l.charCodeAt(2*j+1);for(;0<z.length;){y=[];for(j=w=0;j<z.length;j+=1)if(w=(w<<16)+z[j],u=Math.floor(w/t),w-=u*t,0<y.length||0<u)y[y.length]=u;m[m.length]=w;z=y}t="";for(j=m.length-1;0<=j;j--)t+=k.charAt(m[j]);m=Math.ceil(8*l.length/(Math.log(k.length)/Math.log(2)));for(j=t.length;j<m;j+=1)t=k[0]+t;return t}function I(l,k){var t="",m=l.length,j,u,w;k=k||"=";for(j=0;j<m;j+=3){w=l.charCodeAt(j)<<16|(j+1<m?l.charCodeAt(j+1)<<8:0)|(j+2<m?l.charCodeAt(j+2):0);for(u=0;4>u;u+=1)t=8*j+6*u>8*l.length?t+k:t+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(w>>>6*(3-u)&63)}return t}var M;M={Base64:function(){var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k="=",t=!0;this.encode=function(m){var j,u,w,y="",z=m.length;k=k||"=";m=t?C(m):m;for(j=0;j<z;j+=3){w=m.charCodeAt(j)<<16|(j+1<z?m.charCodeAt(j+1)<<8:0)|(j+2<z?m.charCodeAt(j+2):0);for(u=0;4>u;u+=1)y=8*j+6*u>8*z?y+k:y+l.charAt(w>>>6*(3-u)&63)}return y};this.decode=function(m){var j,u,w,y,z,B,D;j="";var n=[];if(!m)return m;j=D=0;m=m.replace(RegExp("\\"+k,"gi"),"");do u=l.indexOf(m.charAt(j+=1)),w=l.indexOf(m.charAt(j+=1)),z=l.indexOf(m.charAt(j+=1)),B=l.indexOf(m.charAt(j+=1)),y=u<<18|w<<12|z<<6|B,u=y>>16&255,w=y>>8&255,y&=255,D+=1,n[D]=64===z?String.fromCharCode(u):64===B?String.fromCharCode(u,w):String.fromCharCode(u,w,y);while(j<m.length);j=n.join("");if(t){m=j;u=[];w=m.length;j=z=0;for(m+="";j<w;)B=m.charCodeAt(j),z+=1,128>B?(u[z]=String.fromCharCode(B),j+=1):191<B&&224>B?(D=m.charCodeAt(j+1),u[z]=String.fromCharCode((B&31)<<6|D&63),j+=2):(D=m.charCodeAt(j+1),n=m.charCodeAt(j+2),u[z]=String.fromCharCode((B&15)<<12|(D&63)<<6|n&63),j+=3);m=u.join("")}else m=j;return m};this.setPad=function(m){k=m||k;return this};this.setTab=function(m){l=m||l;return this};this.setUTF8=function(m){"boolean"===typeof m&&(t=m);return this}},CRC32:function(l){var k=0,t=0,t=0,m;l=C(l);k^=-1;m=0;for(iTop=l.length;m<iTop;m+=1)t=(k^l.charCodeAt(m))&255,t="0x"+"00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substr(9*t,8),k=k>>>8^t;return k^-1},MD5:function(l){function k(j){j=D?C(j):j;return R(m(K(j),8*j.length))}function t(j,A){var v,F,k;j=D?C(j):j;A=D?C(A):A;v=K(j);16<v.length&&(v=m(v,8*j.length));F=Array(16);opad=Array(16);for(k=0;16>k;k+=1)F[k]=v[k]^909522486,opad[k]=v[k]^1549556828;v=m(F.concat(K(A)),512+8*A.length);return R(m(opad.concat(v),640))}function m(n,A){var v,F,k,m,z,s=1732584193,q=-271733879,r=-1732584194,p=271733878;n[A>>5]|=128<<A%32;n[(A+64>>>9<<4)+14]=A;for(v=0;v<n.length;v+=16)F=s,k=q,m=r,z=p,s=u(s,q,r,p,n[v+0],7,-680876936),p=u(p,s,q,r,n[v+1],12,-389564586),r=u(r,p,s,q,n[v+2],17,606105819),q=u(q,r,p,s,n[v+3],22,-1044525330),s=u(s,q,r,p,n[v+4],7,-176418897),p=u(p,s,q,r,n[v+5],12,1200080426),r=u(r,p,s,q,n[v+6],17,-1473231341),q=u(q,r,p,s,n[v+7],22,-45705983),s=u(s,q,r,p,n[v+8],7,1770035416),p=u(p,s,q,r,n[v+9],12,-1958414417),r=u(r,p,s,q,n[v+10],17,-42063),q=u(q,r,p,s,n[v+11],22,-1990404162),s=u(s,q,r,p,n[v+12],7,1804603682),p=u(p,s,q,r,n[v+13],12,-40341101),r=u(r,p,s,q,n[v+14],17,-1502002290),q=u(q,r,p,s,n[v+15],22,1236535329),s=w(s,q,r,p,n[v+1],5,-165796510),p=w(p,s,q,r,n[v+6],9,-1069501632),r=w(r,p,s,q,n[v+11],14,643717713),q=w(q,r,p,s,n[v+0],20,-373897302),s=w(s,q,r,p,n[v+5],5,-701558691),p=w(p,s,q,r,n[v+10],9,38016083),r=w(r,p,s,q,n[v+15],14,-660478335),q=w(q,r,p,s,n[v+4],20,-405537848),s=w(s,q,r,p,n[v+9],5,568446438),p=w(p,s,q,r,n[v+14],9,-1019803690),r=w(r,p,s,q,n[v+3],14,-187363961),q=w(q,r,p,s,n[v+8],20,1163531501),s=w(s,q,r,p,n[v+13],5,-1444681467),p=w(p,s,q,r,n[v+2],9,-51403784),r=w(r,p,s,q,n[v+7],14,1735328473),q=w(q,r,p,s,n[v+12],20,-1926607734),s=j(q^r^p,s,q,n[v+5],4,-378558),p=j(s^q^r,p,s,n[v+8],11,-2022574463),r=j(p^s^q,r,p,n[v+11],16,1839030562),q=j(r^p^s,q,r,n[v+14],23,-35309556),s=j(q^r^p,s,q,n[v+1],4,-1530992060),p=j(s^q^r,p,s,n[v+4],11,1272893353),r=j(p^s^q,r,p,n[v+7],16,-155497632),q=j(r^p^s,q,r,n[v+10],23,-1094730640),s=j(q^r^p,s,q,n[v+13],4,681279174),p=j(s^q^r,p,s,n[v+0],11,-358537222),r=j(p^s^q,r,p,n[v+3],16,-722521979),q=j(r^p^s,q,r,n[v+6],23,76029189),s=j(q^r^p,s,q,n[v+9],4,-640364487),p=j(s^q^r,p,s,n[v+12],11,-421815835),r=j(p^s^q,r,p,n[v+15],16,530742520),q=j(r^p^s,q,r,n[v+2],23,-995338651),s=y(s,q,r,p,n[v+0],6,-198630844),p=y(p,s,q,r,n[v+7],10,1126891415),r=y(r,p,s,q,n[v+14],15,-1416354905),q=y(q,r,p,s,n[v+5],21,-57434055),s=y(s,q,r,p,n[v+12],6,1700485571),p=y(p,s,q,r,n[v+3],10,-1894986606),r=y(r,p,s,q,n[v+10],15,-1051523),q=y(q,r,p,s,n[v+1],21,-2054922799),s=y(s,q,r,p,n[v+8],6,1873313359),p=y(p,s,q,r,n[v+15],10,-30611744),r=y(r,p,s,q,n[v+6],15,-1560198380),q=y(q,r,p,s,n[v+13],21,1309151649),s=y(s,q,r,p,n[v+4],6,-145523070),p=y(p,s,q,r,n[v+11],10,-1120210379),r=y(r,p,s,q,n[v+2],15,718787259),q=y(q,r,p,s,n[v+9],21,-343485551),s=x(s,F),q=x(q,k),r=x(r,m),p=x(p,z);return[s,q,r,p]}function j(j,A,v,k,m,z){return x(P(x(x(A,j),x(k,z)),m),v)}function u(n,A,v,k,m,z,l){return j(A&v|~A&k,n,A,m,z,l)}function w(n,A,v,k,m,z,l){return j(A&k|v&~k,n,A,m,z,l)}function y(n,A,v,k,m,z,l){return j(v^(A|~k),n,A,m,z,l)}var z=l&&"boolean"===typeof l.uppercase?l.uppercase:!1,B=l&&"string"===typeof l.pad?l.pda:"=",D=l&&"boolean"===typeof l.utf8?l.utf8:!0;this.hex=function(j){return E(k(j,D),z)};this.b64=function(j){return I(k(j),B)};this.any=function(j,A){return G(k(j,D),A)};this.hex_hmac=function(j,A){return E(t(j,A),z)};this.b64_hmac=function(j,A){return I(t(j,A),B)};this.any_hmac=function(j,A,v){return G(t(j,A),v)};this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()};this.setUpperCase=function(j){"boolean"===typeof j&&(z=j);return this};this.setPad=function(j){B=j||B;return this};this.setUTF8=function(j){"boolean"===typeof j&&(D=j);return this}},SHA1:function(l){function k(j){j=w?C(j):j;return L(m(J(j),8*j.length))}function t(j,k){var l,u,n;j=w?C(j):j;k=w?C(k):k;l=J(j);16<l.length&&(l=m(l,8*j.length));u=Array(16);opad=Array(16);for(n=0;16>n;n+=1)u[n]=l[n]^909522486,opad[n]=l[n]^1549556828;l=m(u.concat(J(k)),512+8*k.length);return L(m(opad.concat(l),672))}function m(j,k){var m,l,n,A,v,F,u,w,t=Array(80),s=1732584193,q=-271733879,r=-1732584194,p=271733878,N=-1009589776;j[k>>5]|=128<<24-k%32;j[(k+64>>9<<4)+15]=k;for(m=0;m<j.length;m+=16){A=s;v=q;F=r;u=p;w=N;for(l=0;80>l;l+=1){t[l]=16>l?j[m+l]:P(t[l-3]^t[l-8]^t[l-14]^t[l-16],1);n=P(s,5);var C;C=20>l?q&r|~q&p:40>l?q^r^p:60>l?q&r|q&p|r&p:q^r^p;n=x(x(n,C),x(x(N,t[l]),20>l?1518500249:40>l?1859775393:60>l?-1894007588:-899497514));N=p;p=r;r=P(q,30);q=s;s=n}s=x(s,A);q=x(q,v);r=x(r,F);p=x(p,u);N=x(N,w)}return[s,q,r,p,N]}var j=l&&"boolean"===typeof l.uppercase?l.uppercase:!1,u=l&&"string"===typeof l.pad?l.pda:"=",w=l&&"boolean"===typeof l.utf8?l.utf8:!0;this.hex=function(m){return E(k(m,w),j)};this.b64=function(j){return I(k(j,w),u)};this.any=function(j,m){return G(k(j,w),m)};this.hex_hmac=function(j,k){return E(t(j,k))};this.b64_hmac=function(j,k){return I(t(j,k),u)};this.any_hmac=function(j,k,m){return G(t(j,k),m)};this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()};this.setUpperCase=function(k){"boolean"===typeof k&&(j=k);return this};this.setPad=function(j){u=j||u;return this};this.setUTF8=function(j){"boolean"===typeof j&&(w=j);return this}},SHA256:function(l){function k(k,m){k=m?C(k):k;return L(j(J(k),8*k.length))}function t(k,m){k=w?C(k):k;m=w?C(m):m;var l;l=0;var n=J(k),A=Array(16),v=Array(16);for(16<n.length&&(n=j(n,8*k.length));16>l;l+=1)A[l]=n[l]^909522486,v[l]=n[l]^1549556828;l=j(A.concat(J(m)),512+8*m.length);return L(j(v.concat(l),768))}function m(j,k){return j>>>k|j<<32-k}function j(j,k){var l=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],n=Array(64),A,v,F,u,t,w,s,q,r,p,N,C;j[k>>5]|=128<<24-k%32;j[(k+64>>9<<4)+15]=k;for(r=0;r<j.length;r+=16){A=l[0];v=l[1];F=l[2];u=l[3];t=l[4];w=l[5];s=l[6];q=l[7];for(p=0;64>p;p+=1)n[p]=16>p?j[p+r]:x(x(x(m(n[p-2],17)^m(n[p-2],19)^n[p-2]>>>10,n[p-7]),m(n[p-15],7)^m(n[p-15],18)^n[p-15]>>>3),n[p-16]),N=x(x(x(x(q,m(t,6)^m(t,11)^m(t,25)),t&w^~t&s),y[p]),n[p]),C=x(m(A,2)^m(A,13)^m(A,22),A&v^A&F^v&F),q=s,s=w,w=t,t=x(u,N),u=F,F=v,v=A,A=x(N,C);l[0]=x(A,l[0]);l[1]=x(v,l[1]);l[2]=x(F,l[2]);l[3]=x(u,l[3]);l[4]=x(t,l[4]);l[5]=x(w,l[5]);l[6]=x(s,l[6]);l[7]=x(q,l[7])}return l}var u=l&&"string"===typeof l.pad?l.pda:"=",w=l&&"boolean"===typeof l.utf8?l.utf8:!0,y;this.hex=function(j){return E(k(j,w))};this.b64=function(j){return I(k(j,w),u)};this.any=function(j,l){return G(k(j,w),l)};this.hex_hmac=function(j,k){return E(t(j,k))};this.b64_hmac=function(j,k){return I(t(j,k),u)};this.any_hmac=function(j,k,l){return G(t(j,k),l)};this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()};this.setUpperCase=function(){return this};this.setPad=function(j){u=j||u;return this};this.setUTF8=function(j){"boolean"===typeof j&&(w=j);return this};y=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998]},SHA512:function(l){function k(j){j=D?C(j):j;return L(m(J(j),8*j.length))}function t(j,k){j=D?C(j):j;k=D?C(k):k;var l;l=0;var n=J(j),u=Array(32),t=Array(32);for(32<n.length&&(n=m(n,8*j.length));32>l;l+=1)u[l]=n[l]^909522486,t[l]=n[l]^1549556828;l=m(u.concat(J(k)),1024+8*k.length);return L(m(t.concat(l),1536))}function m(k,l){var m,t,C,B=Array(80);hash=Array(16);H=[new j(1779033703,-205731576),new j(-1150833019,-2067093701),new j(1013904242,-23791573),new j(-1521486534,1595750129),new j(1359893119,-1377402159),new j(-1694144372,725511199),new j(528734635,-79577749),new j(1541459225,327033209)];T1=new j(0,0);T2=new j(0,0);a=new j(0,0);b=new j(0,0);c=new j(0,0);d=new j(0,0);e=new j(0,0);f=new j(0,0);g=new j(0,0);h=new j(0,0);s0=new j(0,0);s1=new j(0,0);Ch=new j(0,0);Maj=new j(0,0);r1=new j(0,0);r2=new j(0,0);r3=new j(0,0);void 0===n&&(n=[new j(1116352408,-685199838),new j(1899447441,602891725),new j(-1245643825,-330482897),new j(-373957723,-2121671748),new j(961987163,-213338824),new j(1508970993,-1241133031),new j(-1841331548,-1357295717),new j(-1424204075,-630357736),new j(-670586216,-1560083902),new j(310598401,1164996542),new j(607225278,1323610764),new j(1426881987,-704662302),new j(1925078388,-226784913),new j(-2132889090,991336113),new j(-1680079193,633803317),new j(-1046744716,-815192428),new j(-459576895,-1628353838),new j(-272742522,944711139),new j(264347078,-1953704523),new j(604807628,2007800933),new j(770255983,1495990901),new j(1249150122,1856431235),new j(1555081692,-1119749164),new j(1996064986,-2096016459),new j(-1740746414,-295247957),new j(-1473132947,766784016),new j(-1341970488,-1728372417),new j(-1084653625,-1091629340),new j(-958395405,1034457026),new j(-710438585,-1828018395),new j(113926993,-536640913),new j(338241895,168717936),new j(666307205,1188179964),new j(773529912,1546045734),new j(1294757372,1522805485),new j(1396182291,-1651133473),new j(1695183700,-1951439906),new j(1986661051,1014477480),new j(-2117940946,1206759142),new j(-1838011259,344077627),new j(-1564481375,1290863460),new j(-1474664885,-1136513023),new j(-1035236496,-789014639),new j(-949202525,106217008),new j(-778901479,-688958952),new j(-694614492,1432725776),new j(-200395387,1467031594),new j(275423344,851169720),new j(430227734,-1194143544),new j(506948616,1363258195),new j(659060556,-544281703),new j(883997877,-509917016),new j(958139571,-976659869),new j(1322822218,-482243893),new j(1537002063,2003034995),new j(1747873779,-692930397),new j(1955562222,1575990012),new j(2024104815,1125592928),new j(-2067236844,-1578062990),new j(-1933114872,442776044),new j(-1866530822,593698344),new j(-1538233109,-561857047),new j(-1090935817,-1295615723),new j(-965641998,-479046869),new j(-903397682,-366583396),new j(-779700025,566280711),new j(-354779690,-840897762),new j(-176337025,-294727304),new j(116418474,1914138554),new j(174292421,-1563912026),new j(289380356,-1090974290),new j(460393269,320620315),new j(685471733,587496836),new j(852142971,1086792851),new j(1017036298,365543100),new j(1126000580,-1676669620),new j(1288033470,-885112138),new j(1501505948,-60457430),new j(1607167915,987167468),new j(1816402316,1246189591)]);for(t=0;80>t;t+=1)B[t]=new j(0,0);k[l>>5]|=128<<24-(l&31);k[(l+128>>10<<5)+31]=l;C=k.length;for(t=0;t<C;t+=32){u(a,H[0]);u(b,H[1]);u(c,H[2]);u(d,H[3]);u(e,H[4]);u(f,H[5]);u(g,H[6]);u(h,H[7]);for(m=0;16>m;m+=1)B[m].h=k[t+2*m],B[m].l=k[t+2*m+1];for(m=16;80>m;m+=1){w(r1,B[m-2],19);x(r2,B[m-2],29);var s=r3,q=B[m-2];s.l=q.l>>>6|q.h<<26;s.h=q.h>>>6;s1.l=r1.l^r2.l^r3.l;s1.h=r1.h^r2.h^r3.h;w(r1,B[m-15],1);w(r2,B[m-15],8);s=r3;q=B[m-15];s.l=q.l>>>7|q.h<<25;s.h=q.h>>>7;s0.l=r1.l^r2.l^r3.l;s0.h=r1.h^r2.h^r3.h;var s=B[m],r=B[m-7],p=B[m-16],q=(s1.l&65535)+(r.l&65535)+(s0.l&65535)+(p.l&65535),D=(s1.l>>>16)+(r.l>>>16)+(s0.l>>>16)+(p.l>>>16)+(q>>>16),E=(s1.h&65535)+(r.h&65535)+(s0.h&65535)+(p.h&65535)+(D>>>16),r=(s1.h>>>16)+(r.h>>>16)+(s0.h>>>16)+(p.h>>>16)+(E>>>16);s.l=q&65535|D<<16;s.h=E&65535|r<<16}for(m=0;80>m;m+=1)Ch.l=e.l&f.l^~e.l&g.l,Ch.h=e.h&f.h^~e.h&g.h,w(r1,e,14),w(r2,e,18),x(r3,e,9),s1.l=r1.l^r2.l^r3.l,s1.h=r1.h^r2.h^r3.h,w(r1,a,28),x(r2,a,2),x(r3,a,7),s0.l=r1.l^r2.l^r3.l,s0.h=r1.h^r2.h^r3.h,Maj.l=a.l&b.l^a.l&c.l^b.l&c.l,Maj.h=a.h&b.h^a.h&c.h^b.h&c.h,s=T1,r=n[m],p=B[m],q=(h.l&65535)+(s1.l&65535)+(Ch.l&65535)+(r.l&65535)+(p.l&65535),D=(h.l>>>16)+(s1.l>>>16)+(Ch.l>>>16)+(r.l>>>16)+(p.l>>>16)+(q>>>16),E=(h.h&65535)+(s1.h&65535)+(Ch.h&65535)+(r.h&65535)+(p.h&65535)+(D>>>16),r=(h.h>>>16)+(s1.h>>>16)+(Ch.h>>>16)+(r.h>>>16)+(p.h>>>16)+(E>>>16),s.l=q&65535|D<<16,s.h=E&65535|r<<16,z(T2,s0,Maj),u(h,g),u(g,f),u(f,e),z(e,d,T1),u(d,c),u(c,b),u(b,a),z(a,T1,T2);z(H[0],H[0],a);z(H[1],H[1],b);z(H[2],H[2],c);z(H[3],H[3],d);z(H[4],H[4],e);z(H[5],H[5],f);z(H[6],H[6],g);z(H[7],H[7],h)}for(t=0;8>t;t+=1)hash[2*t]=H[t].h,hash[2*t+1]=H[t].l;return hash}function j(j,k){this.h=j;this.l=k}function u(j,k){j.h=k.h;j.l=k.l}function w(j,k,l){j.l=k.l>>>l|k.h<<32-l;j.h=k.h>>>l|k.l<<32-l}function x(j,k,l){j.l=k.h>>>l|k.l<<32-l;j.h=k.l>>>l|k.h<<32-l}function z(j,k,l){var m=(k.l&65535)+(l.l&65535),n=(k.l>>>16)+(l.l>>>16)+(m>>>16),t=(k.h&65535)+(l.h&65535)+(n>>>16);k=(k.h>>>16)+(l.h>>>16)+(t>>>16);j.l=m&65535|n<<16;j.h=t&65535|k<<16}var B=l&&"string"===typeof l.pad?l.pda:"=",D=l&&"boolean"===typeof l.utf8?l.utf8:!0,n;this.hex=function(j){return E(k(j))};this.b64=function(j){return I(k(j),B)};this.any=function(j,l){return G(k(j),l)};this.hex_hmac=function(j,k){return E(t(j,k))};this.b64_hmac=function(j,k){return I(t(j,k),B)};this.any_hmac=function(j,k,l){return G(t(j,k),l)};this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()};this.setUpperCase=function(){return this};this.setPad=function(j){B=j||B;return this};this.setUTF8=function(j){"boolean"===typeof j&&(D=j);return this}},RMD160:function(l){function k(k){k=y?C(k):k;return m(j(K(k),8*k.length))}function t(k,l){k=y?C(k):k;l=y?C(l):l;var n,t=K(k),u=Array(16),w=Array(16);16<t.length&&(t=j(t,8*k.length));for(n=0;16>n;n+=1)u[n]=t[n]^909522486,w[n]=t[n]^1549556828;n=j(u.concat(K(l)),512+8*l.length);return m(j(w.concat(n),672))}function m(j){var k,l="",m=3*j.length;for(k=0;k<m;k+=8)l+=String.fromCharCode(j[k>>5]>>>k%32&255);return l}function j(j,k){var l,m,t,w,s=1732584193,q=4023233417,r=2562383102,p=271733878,y=3285377520,C=s,E=q,G=r,I=p,J=y,L=s,K=q,M=r,O=p,Q=y;j[k>>5]|=128<<k%32;j[(k+64>>>9<<4)+14]=k;w=j.length;for(t=0;t<w;t+=16){for(m=0;79>=m;m+=1)l=x(C,u(m,E,G,I)),l=x(l,j[t+z[m]]),l=x(l,0<=m&&15>=m?0:16<=m&&31>=m?1518500249:32<=m&&47>=m?1859775393:48<=m&&63>=m?2400959708:64<=m&&79>=m?2840853838:"rmd160_K1: j out of range"),l=x(P(l,D[m]),J),C=J,J=I,I=P(G,10),G=E,E=l,l=x(L,u(79-m,K,M,O)),l=x(l,j[t+B[m]]),l=x(l,0<=m&&15>=m?1352829926:16<=m&&31>=m?1548603684:32<=m&&47>=m?1836072691:48<=m&&63>=m?2053994217:64<=m&&79>=m?0:"rmd160_K2: j out of range"),l=x(P(l,n[m]),Q),L=Q,Q=O,O=P(M,10),M=K,K=l;l=x(q,x(G,O));q=x(r,x(I,Q));r=x(p,x(J,L));p=x(y,x(C,K));y=x(s,x(E,M));s=l}return[s,q,r,p,y]}function u(j,k,l,m){return 0<=j&&15>=j?k^l^m:16<=j&&31>=j?k&l|~k&m:32<=j&&47>=j?(k|~l)^m:48<=j&&63>=j?k&m|l&~m:64<=j&&79>=j?k^(l|~m):"rmd160_f: j out of range"}var w=l&&"string"===typeof l.pad?l.pda:"=",y=l&&"boolean"===typeof l.utf8?l.utf8:!0,z=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],B=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],D=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],n=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(j){return E(k(j,y))};this.b64=function(j){return I(k(j,y),w)};this.any=function(j,l){return G(k(j,y),l)};this.hex_hmac=function(j,k){return E(t(j,k))};this.b64_hmac=function(j,k){return I(t(j,k),w)};this.any_hmac=function(j,k,l){return G(t(j,k),l)};this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()};this.setUpperCase=function(){return this};this.setPad=function(j){"undefined"!==typeof j&&(w=j);return this};this.setUTF8=function(j){"boolean"===typeof j&&(y=j);return this}}};var S=this,O=!1;"object"===typeof exports&&(O=exports)&&("object"===typeof global&&global&&global===global.global)&&(S=global);"function"===typeof define&&"object"===typeof define.amd&&define.amd?define(function(){return M}):O?"object"===typeof module&&module&&module.exports===O?module.exports=M:O.Hashes=M:S.Hashes=M})();
(function(){function u(b){var c,m,d="",a=-1,l;if(b&&b.length)for(l=b.length;(a+=1)<l;)c=b.charCodeAt(a),m=a+1<l?b.charCodeAt(a+1):0,55296<=c&&(56319>=c&&56320<=m&&57343>=m)&&(c=65536+((c&1023)<<10)+(m&1023),a+=1),127>=c?d+=String.fromCharCode(c):2047>=c?d+=String.fromCharCode(192|c>>>6&31,128|c&63):65535>=c?d+=String.fromCharCode(224|c>>>12&15,128|c>>>6&63,128|c&63):2097151>=c&&(d+=String.fromCharCode(240|c>>>18&7,128|c>>>12&63,128|c>>>6&63,128|c&63));return d}function p(b,c){var m=(b&65535)+(c&65535);return(b>>16)+(c>>16)+(m>>16)<<16|m&65535}function F(b,c){return b<<c|b>>>32-c}function y(b,c){for(var m=c?"0123456789ABCDEF":"0123456789abcdef",d="",a,l=0,n=b.length;l<n;l+=1)a=b.charCodeAt(l),d+=m.charAt(a>>>4&15)+m.charAt(a&15);return d}function O(b){var c,m=32*b.length,d="";for(c=0;c<m;c+=8)d+=String.fromCharCode(b[c>>5]>>>24-c%32&255);return d}function V(b){var c,m=32*b.length,d="";for(c=0;c<m;c+=8)d+=String.fromCharCode(b[c>>5]>>>c%32&255);return d}function P(b){var c,m=8*b.length,d=Array(b.length>>2),a=d.length;for(c=0;c<a;c+=1)d[c]=0;for(c=0;c<m;c+=8)d[c>>5]|=(b.charCodeAt(c/8)&255)<<c%32;return d}function z(b){var c,m=8*b.length,d=Array(b.length>>2),a=d.length;for(c=0;c<a;c+=1)d[c]=0;for(c=0;c<m;c+=8)d[c>>5]|=(b.charCodeAt(c/8)&255)<<24-c%32;return d}function B(b,c){var m=c.length,d=[],a,l,n,s,q;q=Array(Math.ceil(b.length/2));l=q.length;for(a=0;a<l;a+=1)q[a]=b.charCodeAt(2*a)<<8|b.charCodeAt(2*a+1);for(;0<q.length;){s=[];for(a=n=0;a<q.length;a+=1)if(n=(n<<16)+q[a],l=Math.floor(n/m),n-=l*m,0<s.length||0<l)s[s.length]=l;d[d.length]=n;q=s}m="";for(a=d.length-1;0<=a;a--)m+=c.charAt(d[a]);d=Math.ceil(8*b.length/(Math.log(c.length)/Math.log(2)));for(a=m.length;a<d;a+=1)m=c[0]+m;return m}function w(b,c){var m="",d=b.length,a,l,n;c=c||"=";for(a=0;a<d;a+=3){n=b.charCodeAt(a)<<16|(a+1<d?b.charCodeAt(a+1)<<8:0)|(a+2<d?b.charCodeAt(a+2):0);for(l=0;4>l;l+=1)m=8*a+6*l>8*b.length?m+c:m+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>>6*(3-l)&63)}return m}var S;S={VERSION:"1.0.3",Base64:function(){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c="=",m=!0;this.encode=function(d){var a,l,n,s="",q=d.length;c=c||"=";d=m?u(d):d;for(a=0;a<q;a+=3){n=d.charCodeAt(a)<<16|(a+1<q?d.charCodeAt(a+1)<<8:0)|(a+2<q?d.charCodeAt(a+2):0);for(l=0;4>l;l+=1)s=8*a+6*l>8*q?s+c:s+b.charAt(n>>>6*(3-l)&63)}return s};this.decode=function(d){var a,l,n,s,q,t,v;a="";var f=[];if(!d)return d;a=v=0;d=d.replace(RegExp("\\"+c,"gi"),"");do l=b.indexOf(d.charAt(a+=1)),n=b.indexOf(d.charAt(a+=1)),q=b.indexOf(d.charAt(a+=1)),t=b.indexOf(d.charAt(a+=1)),s=l<<18|n<<12|q<<6|t,l=s>>16&255,n=s>>8&255,s&=255,v+=1,f[v]=64===q?String.fromCharCode(l):64===t?String.fromCharCode(l,n):String.fromCharCode(l,n,s);while(a<d.length);a=f.join("");if(m){d=a;l=[];a=q=0;if(d&&d.length){n=d.length;for(d+="";a<n;)t=d.charCodeAt(a),q+=1,128>t?(l[q]=String.fromCharCode(t),a+=1):191<t&&224>t?(v=d.charCodeAt(a+1),l[q]=String.fromCharCode((t&31)<<6|v&63),a+=2):(v=d.charCodeAt(a+1),f=d.charCodeAt(a+2),l[q]=String.fromCharCode((t&15)<<12|(v&63)<<6|f&63),a+=3)}d=l.join("")}else d=a;return d};this.setPad=function(d){c=d||c;return this};this.setTab=function(d){b=d||b;return this};this.setUTF8=function(d){"boolean"===typeof d&&(m=d);return this}},CRC32:function(b){var c=0,m=0,m=0,d,a;b=u(b);c^=-1;d=0;for(a=b.length;d<a;d+=1)m=(c^b.charCodeAt(d))&255,m="0x"+"00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substr(9*m,8),c=c>>>8^m;return(c^-1)>>>0},MD5:function(b){function c(a){a=v?u(a):a;return V(d(P(a),8*a.length))}function m(a,r){var j,A,c,q;a=v?u(a):a;r=v?u(r):r;j=P(a);16<j.length&&(j=d(j,8*a.length));A=Array(16);c=Array(16);for(q=0;16>q;q+=1)A[q]=j[q]^909522486,c[q]=j[q]^1549556828;j=d(A.concat(P(r)),512+8*r.length);return V(d(c.concat(j),640))}function d(f,r){var j,A,d,c,q,k=1732584193,e=-271733879,h=-1732584194,g=271733878;f[r>>5]|=128<<r%32;f[(r+64>>>9<<4)+14]=r;for(j=0;j<f.length;j+=16)A=k,d=e,c=h,q=g,k=l(k,e,h,g,f[j+0],7,-680876936),g=l(g,k,e,h,f[j+1],12,-389564586),h=l(h,g,k,e,f[j+2],17,606105819),e=l(e,h,g,k,f[j+3],22,-1044525330),k=l(k,e,h,g,f[j+4],7,-176418897),g=l(g,k,e,h,f[j+5],12,1200080426),h=l(h,g,k,e,f[j+6],17,-1473231341),e=l(e,h,g,k,f[j+7],22,-45705983),k=l(k,e,h,g,f[j+8],7,1770035416),g=l(g,k,e,h,f[j+9],12,-1958414417),h=l(h,g,k,e,f[j+10],17,-42063),e=l(e,h,g,k,f[j+11],22,-1990404162),k=l(k,e,h,g,f[j+12],7,1804603682),g=l(g,k,e,h,f[j+13],12,-40341101),h=l(h,g,k,e,f[j+14],17,-1502002290),e=l(e,h,g,k,f[j+15],22,1236535329),k=n(k,e,h,g,f[j+1],5,-165796510),g=n(g,k,e,h,f[j+6],9,-1069501632),h=n(h,g,k,e,f[j+11],14,643717713),e=n(e,h,g,k,f[j+0],20,-373897302),k=n(k,e,h,g,f[j+5],5,-701558691),g=n(g,k,e,h,f[j+10],9,38016083),h=n(h,g,k,e,f[j+15],14,-660478335),e=n(e,h,g,k,f[j+4],20,-405537848),k=n(k,e,h,g,f[j+9],5,568446438),g=n(g,k,e,h,f[j+14],9,-1019803690),h=n(h,g,k,e,f[j+3],14,-187363961),e=n(e,h,g,k,f[j+8],20,1163531501),k=n(k,e,h,g,f[j+13],5,-1444681467),g=n(g,k,e,h,f[j+2],9,-51403784),h=n(h,g,k,e,f[j+7],14,1735328473),e=n(e,h,g,k,f[j+12],20,-1926607734),k=a(e^h^g,k,e,f[j+5],4,-378558),g=a(k^e^h,g,k,f[j+8],11,-2022574463),h=a(g^k^e,h,g,f[j+11],16,1839030562),e=a(h^g^k,e,h,f[j+14],23,-35309556),k=a(e^h^g,k,e,f[j+1],4,-1530992060),g=a(k^e^h,g,k,f[j+4],11,1272893353),h=a(g^k^e,h,g,f[j+7],16,-155497632),e=a(h^g^k,e,h,f[j+10],23,-1094730640),k=a(e^h^g,k,e,f[j+13],4,681279174),g=a(k^e^h,g,k,f[j+0],11,-358537222),h=a(g^k^e,h,g,f[j+3],16,-722521979),e=a(h^g^k,e,h,f[j+6],23,76029189),k=a(e^h^g,k,e,f[j+9],4,-640364487),g=a(k^e^h,g,k,f[j+12],11,-421815835),h=a(g^k^e,h,g,f[j+15],16,530742520),e=a(h^g^k,e,h,f[j+2],23,-995338651),k=s(k,e,h,g,f[j+0],6,-198630844),g=s(g,k,e,h,f[j+7],10,1126891415),h=s(h,g,k,e,f[j+14],15,-1416354905),e=s(e,h,g,k,f[j+5],21,-57434055),k=s(k,e,h,g,f[j+12],6,1700485571),g=s(g,k,e,h,f[j+3],10,-1894986606),h=s(h,g,k,e,f[j+10],15,-1051523),e=s(e,h,g,k,f[j+1],21,-2054922799),k=s(k,e,h,g,f[j+8],6,1873313359),g=s(g,k,e,h,f[j+15],10,-30611744),h=s(h,g,k,e,f[j+6],15,-1560198380),e=s(e,h,g,k,f[j+13],21,1309151649),k=s(k,e,h,g,f[j+4],6,-145523070),g=s(g,k,e,h,f[j+11],10,-1120210379),h=s(h,g,k,e,f[j+2],15,718787259),e=s(e,h,g,k,f[j+9],21,-343485551),k=p(k,A),e=p(e,d),h=p(h,c),g=p(g,q);return[k,e,h,g]}function a(a,r,j,A,d,c){return p(F(p(p(r,a),p(A,c)),d),j)}function l(f,r,j,A,d,c,q){return a(r&j|~r&A,f,r,d,c,q)}function n(f,r,j,d,c,q,b){return a(r&d|j&~d,f,r,c,q,b)}function s(f,r,j,d,c,q,b){return a(j^(r|~d),f,r,c,q,b)}var q=b&&"boolean"===typeof b.uppercase?b.uppercase:!1,t=b&&"string"===typeof b.pad?b.pda:"=",v=b&&"boolean"===typeof b.utf8?b.utf8:!0;this.hex=function(a){return y(c(a,v),q)};this.b64=function(a){return w(c(a),t)};this.any=function(a,r){return B(c(a,v),r)};this.hex_hmac=function(a,r){return y(m(a,r),q)};this.b64_hmac=function(a,r){return w(m(a,r),t)};this.any_hmac=function(a,r,j){return B(m(a,r),j)};this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()};this.setUpperCase=function(a){"boolean"===typeof a&&(q=a);return this};this.setPad=function(a){t=a||t;return this};this.setUTF8=function(a){"boolean"===typeof a&&(v=a);return this}},SHA1:function(b){function c(a){a=n?u(a):a;return O(d(z(a),8*a.length))}function m(a,c){var b,l,f,r;a=n?u(a):a;c=n?u(c):c;b=z(a);16<b.length&&(b=d(b,8*a.length));l=Array(16);f=Array(16);for(r=0;16>r;r+=1)l[r]=b[r]^909522486,f[r]=b[r]^1549556828;b=d(l.concat(z(c)),512+8*c.length);return O(d(f.concat(b),672))}function d(a,c){var d,b,f,r,j,A,l,n,m=Array(80),k=1732584193,e=-271733879,h=-1732584194,g=271733878,x=-1009589776;a[c>>5]|=128<<24-c%32;a[(c+64>>9<<4)+15]=c;for(d=0;d<a.length;d+=16){r=k;j=e;A=h;l=g;n=x;for(b=0;80>b;b+=1){m[b]=16>b?a[d+b]:F(m[b-3]^m[b-8]^m[b-14]^m[b-16],1);f=F(k,5);var T;T=20>b?e&h|~e&g:40>b?e^h^g:60>b?e&h|e&g|h&g:e^h^g;f=p(p(f,T),p(p(x,m[b]),20>b?1518500249:40>b?1859775393:60>b?-1894007588:-899497514));x=g;g=h;h=F(e,30);e=k;k=f}k=p(k,r);e=p(e,j);h=p(h,A);g=p(g,l);x=p(x,n)}return[k,e,h,g,x]}var a=b&&"boolean"===typeof b.uppercase?b.uppercase:!1,l=b&&"string"===typeof b.pad?b.pda:"=",n=b&&"boolean"===typeof b.utf8?b.utf8:!0;this.hex=function(d){return y(c(d,n),a)};this.b64=function(a){return w(c(a,n),l)};this.any=function(a,d){return B(c(a,n),d)};this.hex_hmac=function(a,c){return y(m(a,c))};this.b64_hmac=function(a,c){return w(m(a,c),l)};this.any_hmac=function(a,c,d){return B(m(a,c),d)};this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()};this.setUpperCase=function(c){"boolean"===typeof c&&(a=c);return this};this.setPad=function(a){l=a||l;return this};this.setUTF8=function(a){"boolean"===typeof a&&(n=a);return this}},SHA256:function(b){function c(c,d){c=d?u(c):c;return O(a(z(c),8*c.length))}function m(c,d){c=n?u(c):c;d=n?u(d):d;var b;b=0;var f=z(c),r=Array(16),j=Array(16);for(16<f.length&&(f=a(f,8*c.length));16>b;b+=1)r[b]=f[b]^909522486,j[b]=f[b]^1549556828;b=a(r.concat(z(d)),512+8*d.length);return O(a(j.concat(b),768))}function d(a,c){return a>>>c|a<<32-c}function a(a,c){var b=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],f=Array(64),r,j,A,l,m,n,k,e,h,g,x,T;a[c>>5]|=128<<24-c%32;a[(c+64>>9<<4)+15]=c;for(h=0;h<a.length;h+=16){r=b[0];j=b[1];A=b[2];l=b[3];m=b[4];n=b[5];k=b[6];e=b[7];for(g=0;64>g;g+=1)f[g]=16>g?a[g+h]:p(p(p(d(f[g-2],17)^d(f[g-2],19)^f[g-2]>>>10,f[g-7]),d(f[g-15],7)^d(f[g-15],18)^f[g-15]>>>3),f[g-16]),x=p(p(p(p(e,d(m,6)^d(m,11)^d(m,25)),m&n^~m&k),s[g]),f[g]),T=p(d(r,2)^d(r,13)^d(r,22),r&j^r&A^j&A),e=k,k=n,n=m,m=p(l,x),l=A,A=j,j=r,r=p(x,T);b[0]=p(r,b[0]);b[1]=p(j,b[1]);b[2]=p(A,b[2]);b[3]=p(l,b[3]);b[4]=p(m,b[4]);b[5]=p(n,b[5]);b[6]=p(k,b[6]);b[7]=p(e,b[7])}return b}var l=b&&"string"===typeof b.pad?b.pda:"=",n=b&&"boolean"===typeof b.utf8?b.utf8:!0,s;this.hex=function(a){return y(c(a,n))};this.b64=function(a){return w(c(a,n),l)};this.any=function(a,b){return B(c(a,n),b)};this.hex_hmac=function(a,c){return y(m(a,c))};this.b64_hmac=function(a,c){return w(m(a,c),l)};this.any_hmac=function(a,c,b){return B(m(a,c),b)};this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()};this.setUpperCase=function(){return this};this.setPad=function(a){l=a||l;return this};this.setUTF8=function(a){"boolean"===typeof a&&(n=a);return this};s=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998]},SHA512:function(b){function c(a){a=v?u(a):a;return O(d(z(a),8*a.length))}function m(a,j){a=v?u(a):a;j=v?u(j):j;var c;c=0;var b=z(a),f=Array(32),l=Array(32);for(32<b.length&&(b=d(b,8*a.length));32>c;c+=1)f[c]=b[c]^909522486,l[c]=b[c]^1549556828;c=d(f.concat(z(j)),1024+8*j.length);return O(d(l.concat(c),1536))}function d(c,j){var b,d,m,t=Array(80),k=Array(16),e=[new a(1779033703,-205731576),new a(-1150833019,-2067093701),new a(1013904242,-23791573),new a(-1521486534,1595750129),new a(1359893119,-1377402159),new a(-1694144372,725511199),new a(528734635,-79577749),new a(1541459225,327033209)],h=new a(0,0),g=new a(0,0),x=new a(0,0),v=new a(0,0),u=new a(0,0),y=new a(0,0),D=new a(0,0),Q=new a(0,0),R=new a(0,0),G=new a(0,0),E=new a(0,0),C=new a(0,0),J=new a(0,0),B=new a(0,0),K=new a(0,0),L=new a(0,0),M=new a(0,0);void 0===f&&(f=[new a(1116352408,-685199838),new a(1899447441,602891725),new a(-1245643825,-330482897),new a(-373957723,-2121671748),new a(961987163,-213338824),new a(1508970993,-1241133031),new a(-1841331548,-1357295717),new a(-1424204075,-630357736),new a(-670586216,-1560083902),new a(310598401,1164996542),new a(607225278,1323610764),new a(1426881987,-704662302),new a(1925078388,-226784913),new a(-2132889090,991336113),new a(-1680079193,633803317),new a(-1046744716,-815192428),new a(-459576895,-1628353838),new a(-272742522,944711139),new a(264347078,-1953704523),new a(604807628,2007800933),new a(770255983,1495990901),new a(1249150122,1856431235),new a(1555081692,-1119749164),new a(1996064986,-2096016459),new a(-1740746414,-295247957),new a(-1473132947,766784016),new a(-1341970488,-1728372417),new a(-1084653625,-1091629340),new a(-958395405,1034457026),new a(-710438585,-1828018395),new a(113926993,-536640913),new a(338241895,168717936),new a(666307205,1188179964),new a(773529912,1546045734),new a(1294757372,1522805485),new a(1396182291,-1651133473),new a(1695183700,-1951439906),new a(1986661051,1014477480),new a(-2117940946,1206759142),new a(-1838011259,344077627),new a(-1564481375,1290863460),new a(-1474664885,-1136513023),new a(-1035236496,-789014639),new a(-949202525,106217008),new a(-778901479,-688958952),new a(-694614492,1432725776),new a(-200395387,1467031594),new a(275423344,851169720),new a(430227734,-1194143544),new a(506948616,1363258195),new a(659060556,-544281703),new a(883997877,-509917016),new a(958139571,-976659869),new a(1322822218,-482243893),new a(1537002063,2003034995),new a(1747873779,-692930397),new a(1955562222,1575990012),new a(2024104815,1125592928),new a(-2067236844,-1578062990),new a(-1933114872,442776044),new a(-1866530822,593698344),new a(-1538233109,-561857047),new a(-1090935817,-1295615723),new a(-965641998,-479046869),new a(-903397682,-366583396),new a(-779700025,566280711),new a(-354779690,-840897762),new a(-176337025,-294727304),new a(116418474,1914138554),new a(174292421,-1563912026),new a(289380356,-1090974290),new a(460393269,320620315),new a(685471733,587496836),new a(852142971,1086792851),new a(1017036298,365543100),new a(1126000580,-1676669620),new a(1288033470,-885112138),new a(1501505948,-60457430),new a(1607167915,987167468),new a(1816402316,1246189591)]);for(d=0;80>d;d+=1)t[d]=new a(0,0);c[j>>5]|=128<<24-(j&31);c[(j+128>>10<<5)+31]=j;m=c.length;for(d=0;d<m;d+=32){l(x,e[0]);l(v,e[1]);l(u,e[2]);l(y,e[3]);l(D,e[4]);l(Q,e[5]);l(R,e[6]);l(G,e[7]);for(b=0;16>b;b+=1)t[b].h=c[d+2*b],t[b].l=c[d+2*b+1];for(b=16;80>b;b+=1){n(K,t[b-2],19);p(L,t[b-2],29);var N=M,H=t[b-2];N.l=H.l>>>6|H.h<<26;N.h=H.h>>>6;C.l=K.l^L.l^M.l;C.h=K.h^L.h^M.h;n(K,t[b-15],1);n(L,t[b-15],8);N=M;H=t[b-15];N.l=H.l>>>7|H.h<<25;N.h=H.h>>>7;E.l=K.l^L.l^M.l;E.h=K.h^L.h^M.h;var N=t[b],I=t[b-7],w=t[b-16],H=(C.l&65535)+(I.l&65535)+(E.l&65535)+(w.l&65535),z=(C.l>>>16)+(I.l>>>16)+(E.l>>>16)+(w.l>>>16)+(H>>>16),F=(C.h&65535)+(I.h&65535)+(E.h&65535)+(w.h&65535)+(z>>>16),I=(C.h>>>16)+(I.h>>>16)+(E.h>>>16)+(w.h>>>16)+(F>>>16);N.l=H&65535|z<<16;N.h=F&65535|I<<16}for(b=0;80>b;b+=1)J.l=D.l&Q.l^~D.l&R.l,J.h=D.h&Q.h^~D.h&R.h,n(K,D,14),n(L,D,18),p(M,D,9),C.l=K.l^L.l^M.l,C.h=K.h^L.h^M.h,n(K,x,28),p(L,x,2),p(M,x,7),E.l=K.l^L.l^M.l,E.h=K.h^L.h^M.h,B.l=x.l&v.l^x.l&u.l^v.l&u.l,B.h=x.h&v.h^x.h&u.h^v.h&u.h,N=h,I=f[b],w=t[b],H=(G.l&65535)+(C.l&65535)+(J.l&65535)+(I.l&65535)+(w.l&65535),z=(G.l>>>16)+(C.l>>>16)+(J.l>>>16)+(I.l>>>16)+(w.l>>>16)+(H>>>16),F=(G.h&65535)+(C.h&65535)+(J.h&65535)+(I.h&65535)+(w.h&65535)+(z>>>16),I=(G.h>>>16)+(C.h>>>16)+(J.h>>>16)+(I.h>>>16)+(w.h>>>16)+(F>>>16),N.l=H&65535|z<<16,N.h=F&65535|I<<16,q(g,E,B),l(G,R),l(R,Q),l(Q,D),q(D,y,h),l(y,u),l(u,v),l(v,x),q(x,h,g);q(e[0],e[0],x);q(e[1],e[1],v);q(e[2],e[2],u);q(e[3],e[3],y);q(e[4],e[4],D);q(e[5],e[5],Q);q(e[6],e[6],R);q(e[7],e[7],G)}for(d=0;8>d;d+=1)k[2*d]=e[d].h,k[2*d+1]=e[d].l;return k}function a(a,b){this.h=a;this.l=b}function l(a,b){a.h=b.h;a.l=b.l}function n(a,b,c){a.l=b.l>>>c|b.h<<32-c;a.h=b.h>>>c|b.l<<32-c}function p(a,b,c){a.l=b.h>>>c|b.l<<32-c;a.h=b.l>>>c|b.h<<32-c}function q(a,b,c){var d=(b.l&65535)+(c.l&65535),f=(b.l>>>16)+(c.l>>>16)+(d>>>16),l=(b.h&65535)+(c.h&65535)+(f>>>16);b=(b.h>>>16)+(c.h>>>16)+(l>>>16);a.l=d&65535|f<<16;a.h=l&65535|b<<16}var t=b&&"string"===typeof b.pad?b.pda:"=",v=b&&"boolean"===typeof b.utf8?b.utf8:!0,f;this.hex=function(a){return y(c(a))};this.b64=function(a){return w(c(a),t)};this.any=function(a,b){return B(c(a),b)};this.hex_hmac=function(a,b){return y(m(a,b))};this.b64_hmac=function(a,b){return w(m(a,b),t)};this.any_hmac=function(a,b,c){return B(m(a,b),c)};this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()};this.setUpperCase=function(){return this};this.setPad=function(a){t=a||t;return this};this.setUTF8=function(a){"boolean"===typeof a&&(v=a);return this}},RMD160:function(b){function c(b){b=s?u(b):b;return d(a(P(b),8*b.length))}function m(b,c){b=s?u(b):b;c=s?u(c):c;var f,l=P(b),m=Array(16),n=Array(16);16<l.length&&(l=a(l,8*b.length));for(f=0;16>f;f+=1)m[f]=l[f]^909522486,n[f]=l[f]^1549556828;f=a(m.concat(P(c)),512+8*c.length);return d(a(n.concat(f),672))}function d(a){var b,c="",d=32*a.length;for(b=0;b<d;b+=8)c+=String.fromCharCode(a[b>>5]>>>b%32&255);return c}function a(a,b){var c,d,m,n,k=1732584193,e=4023233417,h=2562383102,g=271733878,s=3285377520,u,w,y,D,z,B,G,E,C,J;a[b>>5]|=128<<b%32;a[(b+64>>>9<<4)+14]=b;n=a.length;for(m=0;m<n;m+=16){u=B=k;w=G=e;y=E=h;D=C=g;z=J=s;for(d=0;79>=d;d+=1)c=p(u,l(d,w,y,D)),c=p(c,a[m+q[d]]),c=p(c,0<=d&&15>=d?0:16<=d&&31>=d?1518500249:32<=d&&47>=d?1859775393:48<=d&&63>=d?2400959708:64<=d&&79>=d?2840853838:"rmd160_K1: j out of range"),c=p(F(c,v[d]),z),u=z,z=D,D=F(y,10),y=w,w=c,c=p(B,l(79-d,G,E,C)),c=p(c,a[m+t[d]]),c=p(c,0<=d&&15>=d?1352829926:16<=d&&31>=d?1548603684:32<=d&&47>=d?1836072691:48<=d&&63>=d?2053994217:64<=d&&79>=d?0:"rmd160_K2: j out of range"),c=p(F(c,f[d]),J),B=J,J=C,C=F(E,10),E=G,G=c;c=p(e,p(y,C));e=p(h,p(D,J));h=p(g,p(z,B));g=p(s,p(u,G));s=p(k,p(w,E));k=c}return[k,e,h,g,s]}function l(a,b,c,d){return 0<=a&&15>=a?b^c^d:16<=a&&31>=a?b&c|~b&d:32<=a&&47>=a?(b|~c)^d:48<=a&&63>=a?b&d|c&~d:64<=a&&79>=a?b^(c|~d):"rmd160_f: j out of range"}var n=b&&"string"===typeof b.pad?b.pda:"=",s=b&&"boolean"===typeof b.utf8?b.utf8:!0,q=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],t=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],v=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(a){return y(c(a,s))};this.b64=function(a){return w(c(a,s),n)};this.any=function(a,b){return B(c(a,s),b)};this.hex_hmac=function(a,b){return y(m(a,b))};this.b64_hmac=function(a,b){return w(m(a,b),n)};this.any_hmac=function(a,b,c){return B(m(a,b),c)};this.vm_test=function(){return"900150983cd24fb0d6963f7d28e17f72"===hex("abc").toLowerCase()};this.setUpperCase=function(){return this};this.setPad=function(a){"undefined"!==typeof a&&(n=a);return this};this.setUTF8=function(a){"boolean"===typeof a&&(s=a);return this}}};var W=this,U=!1;"object"===typeof exports&&(U=exports)&&("object"===typeof global&&global&&global===global.global)&&(W=global);"function"===typeof define&&"object"===typeof define.amd&&define.amd?define(function(){return S}):U?"object"===typeof module&&module&&module.exports===U?module.exports=S:U.Hashes=S:W.Hashes=S})();
{
"name" : "jshashes"
, "description" : "A fast and independent hashing library pure JavaScript implemented (ES5 compliant) for both server and client side (MD5, SHA1, SHA256, SHA512, RIPEMD, HMAC and Base64)"
, "description" : "A fast and independent hashing library pure JavaScript implemented (ES3 compliant) for both server and client side (MD5, SHA1, SHA256, SHA512, RIPEMD, HMAC and Base64)"
, "keywords" : [ "hash", "md5", "sha1", "sha256", "hashes", "sha512", "RIPEMD", "base64", "hmac", "crc", "encoding", "algorithm" ]
, "version" : "1.0.2"
, "author" : "Tomas Aparicio <tomas@rijndael-project.com>"
, "version" : "1.0.3"
, "maintainers" : [
{
"name": "Tomas Aparicio",
"email": "tomas@rijndael-project.com",
"email": "tomas@aparicio.me",
"web": "http://tomas.aparicio.me"
}
]
, "contributors": [
{
"name": "C. Scott Ananian",
"email": "cscott@cscott.net",
"web": "http://cscott.net"
}
]
, "repository" : {

@@ -20,2 +26,5 @@ "type" : "git",

, "dependencies": {}
, "devDependencies": {
"mocha": "~1.9.0"
}
, "bugs" : { "url" : "http://github.com/h2non/jsHashes/issues" }

@@ -33,2 +42,8 @@ , "engines" : { "node" : "*", "browser": "*"}

]
, "directories": {
"test": "test"
}
, "scripts": {
"test": "mocha"
}
, "demos": [

@@ -35,0 +50,0 @@ "/examples/client/hexadecimal.html",

@@ -9,4 +9,6 @@ # jsHashes

Its goal is to provide an independent, fast and easy solution for hash algorithms both for client-side and server-side JavaScript environments.
The code is fully compatible with the ECMAScript language specification and was tested in all major browsers (client-side) and node.js (server-side).
The code is fully compatible with the ECMAScript language specification version 3 and was tested in all major browsers (client-side) and node.js (server-side).
If you are looking for a high low-level performance on the server-side, note that Node.js provides its own C++ native module ([Crypto](http://nodejs.org/api/crypto.html)).
## Supported hash algorithms

@@ -37,6 +39,4 @@

Following some software design patterns, `jsHashes` implements an object-oriented class-based paradigm for an easy and clean use.
Each algorithm has its respective own `class`, providing encapsulation and independence from other classes.
Each algorithm has its respective own `class`, providing encapsulation and low coupling between classes.
All the `classes` are defined inside the `Hashes` Object namespace.
Here you can see an example of how to create a new instance for each algorithm:

@@ -77,4 +77,4 @@

<head>
<script type="application/javascript" src="src/hashes.js"></script>
<script type="application/javascript">
<script type="text/javascript" src="src/hashes.js"></script>
<script type="text/javascript">
// sample string

@@ -95,3 +95,3 @@ var str = 'This is a sample text!';

The library was builded using the CommonJS module standard, so the same code works in [Node](http://nodejs.org).
The library is based on CommonJS module standard, so the same code works in [Node](http://nodejs.org) and other environments.

@@ -104,3 +104,3 @@ `jsHashes` is available via NPM. You can install it simply doing:

Aditionaly, you can get jsHashes using [Bower](http://twitter.github.com/bower/) or [Jam](http://jamjs.org/) package managers.
Additionally, you can get jsHashes using [Bower](http://twitter.github.com/bower/) or [Jam](http://jamjs.org/) package managers.

@@ -119,3 +119,3 @@ ```

// require the module
var Hashes = require('hashes');
var Hashes = require('jshashes');
// sample string

@@ -135,5 +135,5 @@ var str = 'This is a sample text!';

* `any(string,encoding)` - Custom hash algorithm values encoding.
* `hex_hmac(string,key)` - Hexadecimal hash with HMAC salt key.
* `b64_hmac(string,key)` - Base64 hash with HMAC salt key.
* `any_hmac(string,key,encoding)` - Custom hash values encoding with HMAC salt key support.
* `hex_hmac(key,string)` - Hexadecimal hash with HMAC salt key.
* `b64_hmac(key,string)` - Base64 hash with HMAC salt key.
* `any_hmac(key,string,encoding)` - Custom hash values encoding with HMAC salt key support.
* `vm_test()` - Simple self-test to see is working. Returns `this` Object.

@@ -181,2 +181,10 @@ * `setUpperCase(boolean)` - Enable/disable uppercase hexadecimal returned string. Returns `this` Object.

* `1.0.3`
- Important bugfixes to UTF-8 encoding (broken in 1.0.2) and the RIPEMD-160 hash (broken in 1.0.1). (gh #6)
- New test suite for hashes, CRC32, and hmac; run with 'npm test' in node.
- Fixed global variable leaks. (gh #13)
- CRC32 will now always return positive values. (gh #11)
- Added package version property to the exposed Hashes Object
- Updated CLI script utility supporting all algorithms (see bin/hashes)
- Fixed UTF-8 encoding/decoding error (if input parameter is undefined or invalid)
* `1.0.2`

@@ -221,5 +229,3 @@ - Performance improvements and minimal refactor (length property caching, literal notation)

* Performance tests with JSLitmus
* Testing
* CLI support
* Performance benchmarking

@@ -230,5 +236,5 @@ ## Authors

* [Tomas Aparicio](tomas@aparicio.me) (<https://github.com/h2non/>)
* [Tomas Aparicio](https://github.com/h2non/)
### Original algorithms implementation authors
### Original algorithm authors

@@ -241,2 +247,3 @@ * [Paul Johnston](http://pajhome.org.uk/crypt/md5/)

* [C. Scott Ananian](https://github.com/cscott)
* Greg Holt

@@ -243,0 +250,0 @@ * Andrew Kepert

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc