From 34f887e77039deb032cfb330953a94f4d4e27822 Mon Sep 17 00:00:00 2001 From: Tomas Aparicio Date: Wed, 24 Jul 2013 23:37:41 +0200 Subject: [PATCH] Upgrade to 1.0.4 --- README.md | 24 +++++++++++- bin/hashes.js | 104 ------------------------------------------------- component.json | 4 +- hashes.js | 4 +- hashes.min.js | 4 +- package.json | 6 +-- 6 files changed, 32 insertions(+), 114 deletions(-) delete mode 100644 bin/hashes.js diff --git a/README.md b/README.md index bd266a4..77474a1 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,25 @@ document.write('

MD5: ' + MD5 + '

'); ``` +### CLI + +You can use the simple command-line interface to generate hashes. + +```bash +$ hashes sha1-hex This is a sample string +> b6a8501d8a70e74e1dc12a6082102622fdc719bb + +# or with quotes +$ hashes sha1-hex "This is a sample string" +> b6a8501d8a70e74e1dc12a6082102622fdc719bb +``` + +For more information about the options supported, type: + +```bash +$ hashes -h +``` + ### Module The library is based on CommonJS module standard, so the same code works in [Node](http://nodejs.org) and other environments. @@ -171,6 +190,9 @@ See `client/benchmark.html` for client-side. ## Changelog +* `1.0.4` + - Fix CLI script call error when use it from Bash + - Added CLI usage example * `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. @@ -246,4 +268,4 @@ jsHashes is released under `New BSD` license. See `LICENSE` file. ## Issues -Feel free to report any issue you experiment via Github . \ No newline at end of file +Feel free to report any issue you experiment via Github . diff --git a/bin/hashes.js b/bin/hashes.js deleted file mode 100644 index 8fbe057..0000000 --- a/bin/hashes.js +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env node -/** - * Simple CLI to simplify common tasks :) - * @beta - */ -var Hashes = require('../hashes'), - args = process.argv, - version = '1.0.3', - usage, options; - -// Usage dialog -usage = [ - 'jsHashes ' + version - , '' - , 'Usage:' - , ' hashes [option] [string]' - , '' - , 'Options:' - , ' 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 , --help, help' - , '' - , 'Current version:' - , ' -v , --version, version' - , '' - , 'Examples:' - , ' $ hashes sha1-hex "sample text!"' - , ' $ node hashes sha1-hex "sample text!"' - , '' -].join('\n'); - -options = [ - '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' -]; - -// 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); -} -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()); \ No newline at end of file diff --git a/component.json b/component.json index 95b4365..eb9bdb2 100644 --- a/component.json +++ b/component.json @@ -1,10 +1,10 @@ { "name": "jsHashes", - "version": "1.0.3", + "version": "1.0.4", "main": "hashes.js", "ignore": [ "**/.*", "node_modules", "components" ] -} \ No newline at end of file +} diff --git a/hashes.js b/hashes.js index 63f49be..1585abc 100644 --- a/hashes.js +++ b/hashes.js @@ -4,7 +4,7 @@ * @class Hashes * @author Tomas Aparicio * @license New BSD (see LICENSE file) - * @version 1.0.3 + * @version 1.0.4 * * Algorithms specification: * @@ -1625,4 +1625,4 @@ window.Hashes = Hashes; } }( this )); -}()); // IIFE \ No newline at end of file +}()); // IIFE diff --git a/hashes.min.js b/hashes.min.js index a583fc8..56ee26b 100644 --- a/hashes.min.js +++ b/hashes.min.js @@ -1,7 +1,7 @@ /* jsHashes (minimized and closure compiled version) - @version 1.0.3 + @version 1.0.4 @license New BSD License @see */ -(function(){function u(b){var c,m,d="",a=-1,l;if(b&&b.length)for(l=b.length;(a+=1)=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<>>32-c}function y(b,c){for(var m=c?"0123456789ABCDEF":"0123456789abcdef",d="",a,l=0,n=b.length;l>>4&15)+m.charAt(a&15);return d}function O(b){var c,m=32*b.length,d="";for(c=0;c>5]>>>24-c%32&255);return d}function V(b){var c,m=32*b.length,d="";for(c=0;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>5]|=(b.charCodeAt(c/8)&255)<>2),a=d.length;for(c=0;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;al;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;al;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(at?(l[q]=String.fromCharCode(t),a+=1):191t?(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>>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);16q;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<>>9<<4)+14]=r;for(j=0;jr;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;db;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(16b;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;hg;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(32c;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;db;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);16f;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>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<>>9<<4)+14]=b;n=a.length;for(m=0;m=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})(); \ No newline at end of file +(function(){function u(b){var c,m,d="",a=-1,l;if(b&&b.length)for(l=b.length;(a+=1)=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<>>32-c}function y(b,c){for(var m=c?"0123456789ABCDEF":"0123456789abcdef",d="",a,l=0,n=b.length;l>>4&15)+m.charAt(a&15);return d}function O(b){var c,m=32*b.length,d="";for(c=0;c>5]>>>24-c%32&255);return d}function V(b){var c,m=32*b.length,d="";for(c=0;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>5]|=(b.charCodeAt(c/8)&255)<>2),a=d.length;for(c=0;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;al;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;al;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(at?(l[q]=String.fromCharCode(t),a+=1):191t?(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>>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);16q;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<>>9<<4)+14]=r;for(j=0;jr;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;db;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(16b;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;hg;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(32c;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;db;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);16f;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>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<>>9<<4)+14]=b;n=a.length;for(m=0;m=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})(); diff --git a/package.json b/package.json index 0013fee..ebe3946 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name" : "jshashes" , "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.3" +, "version" : "1.0.4" , "maintainers" : [ { "name": "Tomas Aparicio", @@ -30,7 +30,7 @@ , "engines" : { "node" : "*", "browser": "*"} , "main" : "hashes" , "bin": { - "hashes": "./bin/hashes.js" + "hashes": "./bin/cli.js" } , "licenses": [ { @@ -48,4 +48,4 @@ "/examples/client/hexadecimal.html", "/examples/client/benchmark.html" ] -} \ No newline at end of file +}