Socket
Socket
Sign inDemoInstall

js-crypto-hash

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-crypto-hash - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5

2

dist/hash.js

@@ -166,3 +166,3 @@ "use strict";

}
}, _callee, this, [[27, 31]]);
}, _callee, null, [[27, 31]]);
}));

@@ -169,0 +169,0 @@ return _compute.apply(this, arguments);

@@ -8,2 +8,2 @@ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],e):"object"==typeof exports?exports.jschash=e(require("crypto")):t.jschash=e(t.crypto)}(this,function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/home/circleci/repo/packages/js-crypto-hash/dist",r(r.s=12)}([function(t,e,r){"use strict";var n=r(1),i=r(18);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function h(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=h(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=u(i.toString(16))}return r},e.zero2=h,e.zero8=u,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),h=0,u=e;h<s.length;h++,u+=4){var a;a="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[h]=a>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,h){var u=0,a=e;return u+=(a=a+n>>>0)<e?1:0,u+=(a=a+o>>>0)<o?1:0,t+r+i+s+(u+=(a=a+h>>>0)<h?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,h){return e+n+o+h>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,h,u,a){var c=0,f=e;return c+=(f=f+n>>>0)<e?1:0,c+=(f=f+o>>>0)<o?1:0,c+=(f=f+h>>>0)<h?1:0,t+r+i+s+u+(c+=(f=f+a>>>0)<a?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,h,u,a){return e+n+o+h+a>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e,r){"use strict";var n=r(0),i=r(1);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNodeCrypto=i,e.getWebCrypto=o,e.getMsCrypto=u,e.getWebCryptoAll=s,e.getRootWebCryptoAll=h,e.default=void 0;var n={getNodeCrypto:i,getWebCrypto:o,getMsCrypto:u,getWebCryptoAll:s,getRootWebCryptoAll:h};function i(){return"undefined"!=typeof window?void 0:r(15)}function o(){if("undefined"!=typeof window)return window.crypto?window.crypto.subtle:void 0}function s(){if("undefined"!=typeof window)return window.msCrypto?window.msCrypto.subtle:window.crypto?window.crypto.subtle:void 0}function h(){if("undefined"!=typeof window)return window.msCrypto?window.msCrypto:window.crypto?window.crypto:void 0}function u(){if("undefined"!=typeof window&&!window.crypto)return window.msCrypto?window.msCrypto.subtle:void 0}e.default=n},function(t,e,r){t.exports=r(13)},function(t,e){var r={utf8:{stringToBytes:function(t){return r.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(r.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}};t.exports=r},function(t,e,r){"use strict";var n=r(0).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,e,r){"use strict";var n=r(0),i=r(2),o=r(6),s=r(1),h=n.sum32,u=n.sum32_4,a=n.sum32_5,c=o.ch32,f=o.maj32,l=o.s0_256,p=o.s1_256,d=o.g0_256,g=o.g1_256,y=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(m,y),t.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(g(r[n-2]),r[n-7],d(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],v=this.h[3],m=this.h[4],w=this.h[5],b=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var x=a(_,p(m),c(m,w,b),this.k[n],r[n]),S=h(l(i),f(i,o,y));_=b,b=w,w=m,m=h(v,x),v=y,y=o,o=i,i=h(x,S)}this.h[0]=h(this.h[0],i),this.h[1]=h(this.h[1],o),this.h[2]=h(this.h[2],y),this.h[3]=h(this.h[3],v),this.h[4]=h(this.h[4],m),this.h[5]=h(this.h[5],w),this.h[6]=h(this.h[6],b),this.h[7]=h(this.h[7],_)},m.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(0),i=r(2),o=r(1),s=n.rotr64_hi,h=n.rotr64_lo,u=n.shr64_hi,a=n.shr64_lo,c=n.sum64,f=n.sum64_hi,l=n.sum64_lo,p=n.sum64_4_hi,d=n.sum64_4_lo,g=n.sum64_5_hi,y=n.sum64_5_lo,v=i.BlockHash,m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function w(){if(!(this instanceof w))return new w;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function b(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function x(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function S(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function k(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function A(t,e){var r=h(t,e,28)^h(e,t,2)^h(e,t,7);return r<0&&(r+=4294967296),r}function L(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function j(t,e){var r=h(t,e,14)^h(t,e,18)^h(e,t,9);return r<0&&(r+=4294967296),r}function z(t,e){var r=s(t,e,1)^s(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function E(t,e){var r=h(t,e,1)^h(t,e,8)^a(t,e,7);return r<0&&(r+=4294967296),r}function T(t,e){var r=s(t,e,19)^s(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}function C(t,e){var r=h(t,e,19)^h(e,t,29)^a(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(w,v),t.exports=w,w.blockSize=1024,w.outSize=512,w.hmacStrength=192,w.padLength=128,w.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=T(r[n-4],r[n-3]),o=C(r[n-4],r[n-3]),s=r[n-14],h=r[n-13],u=z(r[n-30],r[n-29]),a=E(r[n-30],r[n-29]),c=r[n-32],f=r[n-31];r[n]=p(i,o,s,h,u,a,c,f),r[n+1]=d(i,o,s,h,u,a,c,f)}},w.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],h=this.h[3],u=this.h[4],a=this.h[5],p=this.h[6],d=this.h[7],v=this.h[8],m=this.h[9],w=this.h[10],z=this.h[11],E=this.h[12],T=this.h[13],C=this.h[14],O=this.h[15];o(this.k.length===r.length);for(var H=0;H<r.length;H+=2){var B=C,N=O,P=L(v,m),W=j(v,m),M=b(v,m,w,z,E),R=_(v,m,w,z,E,T),F=this.k[H],G=this.k[H+1],I=r[H],U=r[H+1],q=g(B,N,P,W,M,R,F,G,I,U),D=y(B,N,P,W,M,R,F,G,I,U);B=k(n,i),N=A(n,i),P=x(n,i,s,h,u),W=S(n,i,s,h,u,a);var Y=f(B,N,P,W),Z=l(B,N,P,W);C=E,O=T,E=w,T=z,w=v,z=m,v=f(p,d,q,D),m=l(d,d,q,D),p=u,d=a,u=s,a=h,s=n,h=i,n=f(q,D,Y,Z),i=l(q,D,Y,Z)}c(this.h,0,n,i),c(this.h,2,s,h),c(this.h,4,u,a),c(this.h,6,p,d),c(this.h,8,v,m),c(this.h,10,w,z),c(this.h,12,E,T),c(this.h,14,C,O)},w.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e){function r(t,e,r,n,i,o,s){try{var h=t[o](s),u=h.value}catch(t){return void r(t)}h.done?e(u):Promise.resolve(u).then(n,i)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise(function(i,o){var s=t.apply(e,n);function h(t){r(s,i,o,h,u,"next",t)}function u(t){r(s,i,o,h,u,"throw",t)}h(void 0)})}}},function(t,e,r){var n,i,o,s,h;n=r(16),i=r(5).utf8,o=r(17),s=r(5).bin,(h=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?s.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var r=n.bytesToWords(t),u=8*t.length,a=1732584193,c=-271733879,f=-1732584194,l=271733878,p=0;p<r.length;p++)r[p]=16711935&(r[p]<<8|r[p]>>>24)|4278255360&(r[p]<<24|r[p]>>>8);r[u>>>5]|=128<<u%32,r[14+(u+64>>>9<<4)]=u;var d=h._ff,g=h._gg,y=h._hh,v=h._ii;for(p=0;p<r.length;p+=16){var m=a,w=c,b=f,_=l;a=d(a,c,f,l,r[p+0],7,-680876936),l=d(l,a,c,f,r[p+1],12,-389564586),f=d(f,l,a,c,r[p+2],17,606105819),c=d(c,f,l,a,r[p+3],22,-1044525330),a=d(a,c,f,l,r[p+4],7,-176418897),l=d(l,a,c,f,r[p+5],12,1200080426),f=d(f,l,a,c,r[p+6],17,-1473231341),c=d(c,f,l,a,r[p+7],22,-45705983),a=d(a,c,f,l,r[p+8],7,1770035416),l=d(l,a,c,f,r[p+9],12,-1958414417),f=d(f,l,a,c,r[p+10],17,-42063),c=d(c,f,l,a,r[p+11],22,-1990404162),a=d(a,c,f,l,r[p+12],7,1804603682),l=d(l,a,c,f,r[p+13],12,-40341101),f=d(f,l,a,c,r[p+14],17,-1502002290),a=g(a,c=d(c,f,l,a,r[p+15],22,1236535329),f,l,r[p+1],5,-165796510),l=g(l,a,c,f,r[p+6],9,-1069501632),f=g(f,l,a,c,r[p+11],14,643717713),c=g(c,f,l,a,r[p+0],20,-373897302),a=g(a,c,f,l,r[p+5],5,-701558691),l=g(l,a,c,f,r[p+10],9,38016083),f=g(f,l,a,c,r[p+15],14,-660478335),c=g(c,f,l,a,r[p+4],20,-405537848),a=g(a,c,f,l,r[p+9],5,568446438),l=g(l,a,c,f,r[p+14],9,-1019803690),f=g(f,l,a,c,r[p+3],14,-187363961),c=g(c,f,l,a,r[p+8],20,1163531501),a=g(a,c,f,l,r[p+13],5,-1444681467),l=g(l,a,c,f,r[p+2],9,-51403784),f=g(f,l,a,c,r[p+7],14,1735328473),a=y(a,c=g(c,f,l,a,r[p+12],20,-1926607734),f,l,r[p+5],4,-378558),l=y(l,a,c,f,r[p+8],11,-2022574463),f=y(f,l,a,c,r[p+11],16,1839030562),c=y(c,f,l,a,r[p+14],23,-35309556),a=y(a,c,f,l,r[p+1],4,-1530992060),l=y(l,a,c,f,r[p+4],11,1272893353),f=y(f,l,a,c,r[p+7],16,-155497632),c=y(c,f,l,a,r[p+10],23,-1094730640),a=y(a,c,f,l,r[p+13],4,681279174),l=y(l,a,c,f,r[p+0],11,-358537222),f=y(f,l,a,c,r[p+3],16,-722521979),c=y(c,f,l,a,r[p+6],23,76029189),a=y(a,c,f,l,r[p+9],4,-640364487),l=y(l,a,c,f,r[p+12],11,-421815835),f=y(f,l,a,c,r[p+15],16,530742520),a=v(a,c=y(c,f,l,a,r[p+2],23,-995338651),f,l,r[p+0],6,-198630844),l=v(l,a,c,f,r[p+7],10,1126891415),f=v(f,l,a,c,r[p+14],15,-1416354905),c=v(c,f,l,a,r[p+5],21,-57434055),a=v(a,c,f,l,r[p+12],6,1700485571),l=v(l,a,c,f,r[p+3],10,-1894986606),f=v(f,l,a,c,r[p+10],15,-1051523),c=v(c,f,l,a,r[p+1],21,-2054922799),a=v(a,c,f,l,r[p+8],6,1873313359),l=v(l,a,c,f,r[p+15],10,-30611744),f=v(f,l,a,c,r[p+6],15,-1560198380),c=v(c,f,l,a,r[p+13],21,1309151649),a=v(a,c,f,l,r[p+4],6,-145523070),l=v(l,a,c,f,r[p+11],10,-1120210379),f=v(f,l,a,c,r[p+2],15,718787259),c=v(c,f,l,a,r[p+9],21,-343485551),a=a+m>>>0,c=c+w>>>0,f=f+b>>>0,l=l+_>>>0}return n.endian([a,c,f,l])})._ff=function(t,e,r,n,i,o,s){var h=t+(e&r|~e&n)+(i>>>0)+s;return(h<<o|h>>>32-o)+e},h._gg=function(t,e,r,n,i,o,s){var h=t+(e&n|r&~n)+(i>>>0)+s;return(h<<o|h>>>32-o)+e},h._hh=function(t,e,r,n,i,o,s){var h=t+(e^r^n)+(i>>>0)+s;return(h<<o|h>>>32-o)+e},h._ii=function(t,e,r,n,i,o,s){var h=t+(r^(e|~n))+(i>>>0)+s;return(h<<o|h>>>32-o)+e},h._blocksize=16,h._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);var r=n.wordsToBytes(h(t,e));return e&&e.asBytes?r:e&&e.asString?s.bytesToString(r):n.bytesToHex(r)}},function(t,e,r){var n=e;n.utils=r(0),n.common=r(2),n.sha=r(19),n.ripemd=r(23),n.hmac=r(24),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(t,e,r){t.exports=r(25)},function(t,e,r){var n=function(){return this||"object"==typeof self&&self}()||Function("return this")(),i=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,o=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r(14),i)n.regeneratorRuntime=o;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var r,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",h=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",a="object"==typeof t,c=e.regeneratorRuntime;if(c)a&&(t.exports=c);else{(c=e.regeneratorRuntime=a?t.exports:{}).wrap=b;var f="suspendedStart",l="suspendedYield",p="executing",d="completed",g={},y={};y[s]=function(){return this};var v=Object.getPrototypeOf,m=v&&v(v(C([])));m&&m!==n&&i.call(m,s)&&(y=m);var w=k.prototype=x.prototype=Object.create(y);S.prototype=w.constructor=k,k.constructor=S,k[u]=S.displayName="GeneratorFunction",c.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===S||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(w),t},c.awrap=function(t){return{__await:t}},A(L.prototype),L.prototype[h]=function(){return this},c.AsyncIterator=L,c.async=function(t,e,r,n){var i=new L(b(t,e,r,n));return c.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},A(w),w[u]="Generator",w[s]=function(){return this},w.toString=function(){return"[object Generator]"},c.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},c.values=C,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,i){return h.type="throw",h.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],h=s.completion;if("root"===s.tryLoc)return n("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),a=i.call(s,"finallyLoc");if(u&&a){if(this.prev<s.catchLoc)return n(s.catchLoc,!0);if(this.prev<s.finallyLoc)return n(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return n(s.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return n(s.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}}}function b(t,e,r,n){var i=e&&e.prototype instanceof x?e:x,o=Object.create(i.prototype),s=new T(n||[]);return o._invoke=function(t,e,r){var n=f;return function(i,o){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var h=j(s,r);if(h){if(h===g)continue;return h}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=_(t,e,r);if("normal"===u.type){if(n=r.done?d:l,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,s),o}function _(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function x(){}function S(){}function k(){}function A(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(t){var e;this._invoke=function(r,n){function o(){return new Promise(function(e,o){!function e(r,n,o,s){var h=_(t[r],t,n);if("throw"!==h.type){var u=h.arg,a=u.value;return a&&"object"==typeof a&&i.call(a,"__await")?Promise.resolve(a.__await).then(function(t){e("next",t,o,s)},function(t){e("throw",t,o,s)}):Promise.resolve(a).then(function(t){u.value=t,o(u)},function(t){return e("throw",t,o,s)})}s(h.arg)}(r,n,e,o)})}return e=e?e.then(o,o):o()}}function j(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,j(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=_(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function z(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(z,this),this.reset(!0)}function C(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=r,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:r,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(e,r){e.exports=t},function(t,e){var r,n;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],n=0;n<t.length;n+=3)for(var i=t[n]<<16|t[n+1]<<8|t[n+2],o=0;o<4;o++)8*n+6*o<=8*t.length?e.push(r.charAt(i>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,i=0;n<t.length;i=++n%4)0!=i&&e.push((r.indexOf(t.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|r.indexOf(t.charAt(n))>>>6-2*i);return e}},t.exports=n},function(t,e){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}

*/
t.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";e.sha1=r(20),e.sha224=r(21),e.sha256=r(7),e.sha384=r(22),e.sha512=r(8)},function(t,e,r){"use strict";var n=r(0),i=r(2),o=r(6),s=n.rotl32,h=n.sum32,u=n.sum32_5,a=o.ft_1,c=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,c),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],l=this.h[3],p=this.h[4];for(n=0;n<r.length;n++){var d=~~(n/20),g=u(s(i,5),a(d,o,c,l),p,r[n],f[d]);p=l,l=c,c=s(o,30),o=i,i=g}this.h[0]=h(this.h[0],i),this.h[1]=h(this.h[1],o),this.h[2]=h(this.h[2],c),this.h[3]=h(this.h[3],l),this.h[4]=h(this.h[4],p)},l.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(0),i=r(7);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(t,e,r){"use strict";var n=r(0),i=r(8);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(t,e,r){"use strict";var n=r(0),i=r(2),o=n.rotl32,s=n.sum32,h=n.sum32_3,u=n.sum32_4,a=i.BlockHash;function c(){if(!(this instanceof c))return new c;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(c,a),e.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],a=this.h[3],c=this.h[4],m=r,w=n,b=i,_=a,x=c,S=0;S<80;S++){var k=s(o(u(r,f(S,n,i,a),t[d[S]+e],l(S)),y[S]),c);r=c,c=a,a=o(i,10),i=n,n=k,k=s(o(u(m,f(79-S,w,b,_),t[g[S]+e],p(S)),v[S]),x),m=x,x=_,_=o(b,10),b=w,w=k}k=h(this.h[1],i,_),this.h[1]=h(this.h[2],a,x),this.h[2]=h(this.h[3],c,m),this.h[3]=h(this.h[4],r,w),this.h[4]=h(this.h[0],n,b),this.h[0]=k},c.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[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],g=[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],y=[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],v=[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]},function(t,e,r){"use strict";var n=r(0),i=r(1);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e,r){"use strict";r.r(e);var n=r(4),i=r.n(n),o=r(9),s=r.n(o),h=r(3),u={hashes:{"SHA-256":{nodeName:"sha256",hashSize:32},"SHA-384":{nodeName:"sha384",hashSize:48},"SHA-512":{nodeName:"sha512",hashSize:64},"SHA-1":{nodeName:"sha1",hashSize:20},MD5:{nodeName:"md5",hashSize:16}}},a=r(10),c=r.n(a),f=r(11),l=r.n(f);function p(t){return d.apply(this,arguments)}function d(){return(d=s()(i.a.mark(function t(e){var r,n,o,s,a,c,f,l=arguments;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=l.length>1&&void 0!==l[1]?l[1]:"SHA-256",!(Object.keys(u.hashes).indexOf(r)<0)){t.next=3;break}throw new Error("UnsupportedHashAlgorithm");case 3:if(e instanceof Uint8Array){t.next=5;break}throw new Error("UnsupportedMessageType");case 5:if(n=h.getWebCrypto(),o=h.getNodeCrypto(),s=h.getMsCrypto(),f=!0,void 0===n||"function"!=typeof n.digest||void 0!==s){t.next=15;break}return t.next=12,n.digest(r,e).catch(function(t){c=t.message,f=!1});case 12:a=t.sent,t.next=26;break;case 15:if(void 0===o){t.next=19;break}try{a=y(r,e,o)}catch(t){c=t.message,f=!1}t.next=26;break;case 19:if(void 0===s||"function"!=typeof s.digest){t.next=25;break}return t.next=22,g(r,e,s).catch(function(t){c=t.message,f=!1});case 22:a=t.sent,t.next=26;break;case 25:f=!1;case 26:if(f){t.next=35;break}t.prev=27,a=v(r,e),t.next=35;break;case 31:throw t.prev=31,t.t0=t.catch(27),c="".concat(c," => ").concat(t.t0.message),new Error("UnsupportedEnvironment: ".concat(c));case 35:return t.abrupt("return",new Uint8Array(a));case 36:case"end":return t.stop()}},t,this,[[27,31]])}))).apply(this,arguments)}var g=function(t,e,r){return new Promise(function(n,i){var o=r.digest(t,e);o.oncomplete=function(t){n(t.target.result)},o.onerror=function(t){i(t)}})},y=function(t,e,r){var n=u.hashes[t].nodeName,i=r.createHash(n);return i.update(e),i.digest()},v=function(t,e){var r;return r="MD5"===t?c()(Array.from(e),{asBytes:!0}):l.a[u.hashes[t].nodeName]().update(e).digest(),new Uint8Array(r)};r.d(e,"compute",function(){return p});e.default={compute:p}}])});
t.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";e.sha1=r(20),e.sha224=r(21),e.sha256=r(7),e.sha384=r(22),e.sha512=r(8)},function(t,e,r){"use strict";var n=r(0),i=r(2),o=r(6),s=n.rotl32,h=n.sum32,u=n.sum32_5,a=o.ft_1,c=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,c),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],l=this.h[3],p=this.h[4];for(n=0;n<r.length;n++){var d=~~(n/20),g=u(s(i,5),a(d,o,c,l),p,r[n],f[d]);p=l,l=c,c=s(o,30),o=i,i=g}this.h[0]=h(this.h[0],i),this.h[1]=h(this.h[1],o),this.h[2]=h(this.h[2],c),this.h[3]=h(this.h[3],l),this.h[4]=h(this.h[4],p)},l.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},function(t,e,r){"use strict";var n=r(0),i=r(7);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},function(t,e,r){"use strict";var n=r(0),i=r(8);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},function(t,e,r){"use strict";var n=r(0),i=r(2),o=n.rotl32,s=n.sum32,h=n.sum32_3,u=n.sum32_4,a=i.BlockHash;function c(){if(!(this instanceof c))return new c;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(c,a),e.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],a=this.h[3],c=this.h[4],m=r,w=n,b=i,_=a,x=c,S=0;S<80;S++){var k=s(o(u(r,f(S,n,i,a),t[d[S]+e],l(S)),y[S]),c);r=c,c=a,a=o(i,10),i=n,n=k,k=s(o(u(m,f(79-S,w,b,_),t[g[S]+e],p(S)),v[S]),x),m=x,x=_,_=o(b,10),b=w,w=k}k=h(this.h[1],i,_),this.h[1]=h(this.h[2],a,x),this.h[2]=h(this.h[3],c,m),this.h[3]=h(this.h[4],r,w),this.h[4]=h(this.h[0],n,b),this.h[0]=k},c.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[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],g=[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],y=[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],v=[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]},function(t,e,r){"use strict";var n=r(0),i=r(1);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e,r){"use strict";r.r(e);var n=r(4),i=r.n(n),o=r(9),s=r.n(o),h=r(3),u={hashes:{"SHA-256":{nodeName:"sha256",hashSize:32},"SHA-384":{nodeName:"sha384",hashSize:48},"SHA-512":{nodeName:"sha512",hashSize:64},"SHA-1":{nodeName:"sha1",hashSize:20},MD5:{nodeName:"md5",hashSize:16}}},a=r(10),c=r.n(a),f=r(11),l=r.n(f);function p(t){return d.apply(this,arguments)}function d(){return(d=s()(i.a.mark(function t(e){var r,n,o,s,a,c,f,l=arguments;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=l.length>1&&void 0!==l[1]?l[1]:"SHA-256",!(Object.keys(u.hashes).indexOf(r)<0)){t.next=3;break}throw new Error("UnsupportedHashAlgorithm");case 3:if(e instanceof Uint8Array){t.next=5;break}throw new Error("UnsupportedMessageType");case 5:if(n=h.getWebCrypto(),o=h.getNodeCrypto(),s=h.getMsCrypto(),f=!0,void 0===n||"function"!=typeof n.digest||void 0!==s){t.next=15;break}return t.next=12,n.digest(r,e).catch(function(t){c=t.message,f=!1});case 12:a=t.sent,t.next=26;break;case 15:if(void 0===o){t.next=19;break}try{a=y(r,e,o)}catch(t){c=t.message,f=!1}t.next=26;break;case 19:if(void 0===s||"function"!=typeof s.digest){t.next=25;break}return t.next=22,g(r,e,s).catch(function(t){c=t.message,f=!1});case 22:a=t.sent,t.next=26;break;case 25:f=!1;case 26:if(f){t.next=35;break}t.prev=27,a=v(r,e),t.next=35;break;case 31:throw t.prev=31,t.t0=t.catch(27),c="".concat(c," => ").concat(t.t0.message),new Error("UnsupportedEnvironment: ".concat(c));case 35:return t.abrupt("return",new Uint8Array(a));case 36:case"end":return t.stop()}},t,null,[[27,31]])}))).apply(this,arguments)}var g=function(t,e,r){return new Promise(function(n,i){var o=r.digest(t,e);o.oncomplete=function(t){n(t.target.result)},o.onerror=function(t){i(t)}})},y=function(t,e,r){var n=u.hashes[t].nodeName,i=r.createHash(n);return i.update(e),i.digest()},v=function(t,e){var r;return r="MD5"===t?c()(Array.from(e),{asBytes:!0}):l.a[u.hashes[t].nodeName]().update(e).digest(),new Uint8Array(r)};r.d(e,"compute",function(){return p});e.default={compute:p}}])});
{
"name": "js-crypto-hash",
"version": "0.3.4",
"version": "0.3.5",
"description": "Universal Module for Hash Function in JavaScript",

@@ -39,7 +39,7 @@ "main": "dist/index.js",

"dependencies": {
"@babel/runtime": "^7.1.5",
"hash.js": "^1.1.5",
"js-crypto-env": "^0.1.2",
"@babel/runtime": "^7.3.4",
"hash.js": "^1.1.7",
"js-crypto-env": "^0.1.3",
"md5": "^2.2.1"
}
}
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