js-crypto-hash
Advanced tools
Comparing version 0.3.6 to 0.4.0
@@ -10,3 +10,3 @@ "use strict"; | ||
}); | ||
exports.compute = compute; | ||
exports.compute = void 0; | ||
@@ -37,17 +37,6 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
*/ | ||
function compute(_x) { | ||
return _compute.apply(this, arguments); | ||
} | ||
/** | ||
* Compute hash using MsCrypto implementation | ||
* @param {String} hash - Name of hash algorithm like SHA-256 | ||
* @param {Uint8Array} msg - Byte array of message to be hashed. | ||
* @param {Object} msCrypto - msCrypto object. | ||
* @return {Promise<Uint8Array>} - Hash value. | ||
* @throws {Error} - Throws if hashing failed. | ||
*/ | ||
function _compute() { | ||
_compute = (0, _asyncToGenerator2.default)( | ||
var compute = | ||
/*#__PURE__*/ | ||
function () { | ||
var _ref = (0, _asyncToGenerator2.default)( | ||
/*#__PURE__*/ | ||
@@ -170,5 +159,19 @@ _regenerator.default.mark(function _callee(msg) { | ||
})); | ||
return _compute.apply(this, arguments); | ||
} | ||
return function compute(_x) { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); | ||
/** | ||
* Compute hash using MsCrypto implementation | ||
* @param {String} hash - Name of hash algorithm like SHA-256 | ||
* @param {Uint8Array} msg - Byte array of message to be hashed. | ||
* @param {Object} msCrypto - msCrypto object. | ||
* @return {Promise<Uint8Array>} - Hash value. | ||
* @throws {Error} - Throws if hashing failed. | ||
*/ | ||
exports.compute = compute; | ||
var msdigest = function msdigest(hash, msg, msCrypto) { | ||
@@ -175,0 +178,0 @@ return new Promise(function (resolve, reject) { |
@@ -1,2 +0,2 @@ | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],r):"object"==typeof exports?exports.jschash=r(require("crypto")):t.jschash=r(t.crypto)}(this,function(t){return function(t){var r={};function n(e){if(r[e])return r[e].exports;var i=r[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,r){if(1&r&&(t=n(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var i in t)n.d(e,i,function(r){return t[r]}.bind(null,i));return e},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.p="/home/circleci/repo/packages/js-crypto-hash/dist",n(n.s=12)}([function(t,r,n){"use strict";var e=n(1),i=n(17);function o(t,r){return 55296==(64512&t.charCodeAt(r))&&(!(r<0||r+1>=t.length)&&56320==(64512&t.charCodeAt(r+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}r.inherits=i,r.toArray=function(t,r){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(r){if("hex"===r)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var e=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?n[e++]=s:s<2048?(n[e++]=s>>6|192,n[e++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),n[e++]=s>>18|240,n[e++]=s>>12&63|128,n[e++]=s>>6&63|128,n[e++]=63&s|128):(n[e++]=s>>12|224,n[e++]=s>>6&63|128,n[e++]=63&s|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},r.toHex=function(t){for(var r="",n=0;n<t.length;n++)r+=h(t[n].toString(16));return r},r.htonl=s,r.toHex32=function(t,r){for(var n="",e=0;e<t.length;e++){var i=t[e];"little"===r&&(i=s(i)),n+=u(i.toString(16))}return n},r.zero2=h,r.zero8=u,r.join32=function(t,r,n,i){var o=n-r;e(o%4==0);for(var s=new Array(o/4),h=0,u=r;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},r.split32=function(t,r){for(var n=new Array(4*t.length),e=0,i=0;e<t.length;e++,i+=4){var o=t[e];"big"===r?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},r.rotr32=function(t,r){return t>>>r|t<<32-r},r.rotl32=function(t,r){return t<<r|t>>>32-r},r.sum32=function(t,r){return t+r>>>0},r.sum32_3=function(t,r,n){return t+r+n>>>0},r.sum32_4=function(t,r,n,e){return t+r+n+e>>>0},r.sum32_5=function(t,r,n,e,i){return t+r+n+e+i>>>0},r.sum64=function(t,r,n,e){var i=t[r],o=e+t[r+1]>>>0,s=(o<e?1:0)+n+i;t[r]=s>>>0,t[r+1]=o},r.sum64_hi=function(t,r,n,e){return(r+e>>>0<r?1:0)+t+n>>>0},r.sum64_lo=function(t,r,n,e){return r+e>>>0},r.sum64_4_hi=function(t,r,n,e,i,o,s,h){var u=0,a=r;return u+=(a=a+e>>>0)<r?1:0,u+=(a=a+o>>>0)<o?1:0,t+n+i+s+(u+=(a=a+h>>>0)<h?1:0)>>>0},r.sum64_4_lo=function(t,r,n,e,i,o,s,h){return r+e+o+h>>>0},r.sum64_5_hi=function(t,r,n,e,i,o,s,h,u,a){var c=0,f=r;return c+=(f=f+e>>>0)<r?1:0,c+=(f=f+o>>>0)<o?1:0,c+=(f=f+h>>>0)<h?1:0,t+n+i+s+u+(c+=(f=f+a>>>0)<a?1:0)>>>0},r.sum64_5_lo=function(t,r,n,e,i,o,s,h,u,a){return r+e+o+h+a>>>0},r.rotr64_hi=function(t,r,n){return(r<<32-n|t>>>n)>>>0},r.rotr64_lo=function(t,r,n){return(t<<32-n|r>>>n)>>>0},r.shr64_hi=function(t,r,n){return t>>>n},r.shr64_lo=function(t,r,n){return(t<<32-n|r>>>n)>>>0}},function(t,r){function n(t,r){if(!t)throw new Error(r||"Assertion failed")}t.exports=n,n.equal=function(t,r,n){if(t!=r)throw new Error(n||"Assertion failed: "+t+" != "+r)}},function(t,r,n){"use strict";var e=n(0),i=n(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}r.BlockHash=o,o.prototype.update=function(t,r){if(t=e.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-n,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,r=this._delta8,n=r-(t+this.padLength)%r,e=new Array(n+this.padLength);e[0]=128;for(var i=1;i<n;i++)e[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)e[i++]=0;e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=t>>>24&255,e[i++]=t>>>16&255,e[i++]=t>>>8&255,e[i++]=255&t}else for(e[i++]=255&t,e[i++]=t>>>8&255,e[i++]=t>>>16&255,e[i++]=t>>>24&255,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,o=8;o<this.padLength;o++)e[i++]=0;return e}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getNodeCrypto=i,r.getWebCrypto=o,r.getMsCrypto=u,r.getWebCryptoAll=s,r.getRootWebCryptoAll=h,r.default=void 0;var e={getNodeCrypto:i,getWebCrypto:o,getMsCrypto:u,getWebCryptoAll:s,getRootWebCryptoAll:h};function i(){return"undefined"!=typeof window?void 0:n(14)}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}r.default=e},function(t,r,n){t.exports=n(13)},function(t,r){var n={utf8:{stringToBytes:function(t){return n.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(n.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],n=0;n<t.length;n++)r.push(255&t.charCodeAt(n));return r},bytesToString:function(t){for(var r=[],n=0;n<t.length;n++)r.push(String.fromCharCode(t[n]));return r.join("")}}};t.exports=n},function(t,r,n){"use strict";var e=n(0).rotr32;function i(t,r,n){return t&r^~t&n}function o(t,r,n){return t&r^t&n^r&n}function s(t,r,n){return t^r^n}r.ft_1=function(t,r,n,e){return 0===t?i(r,n,e):1===t||3===t?s(r,n,e):2===t?o(r,n,e):void 0},r.ch32=i,r.maj32=o,r.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},r.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},r.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},r.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10}},function(t,r,n){"use strict";var e=n(0),i=n(2),o=n(6),s=n(1),h=e.sum32,u=e.sum32_4,a=e.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)}e.inherits(m,y),t.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(t,r){for(var n=this.W,e=0;e<16;e++)n[e]=t[r+e];for(;e<n.length;e++)n[e]=u(g(n[e-2]),n[e-7],d(n[e-15]),n[e-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===n.length),e=0;e<n.length;e++){var x=a(_,p(m),c(m,w,b),this.k[e],n[e]),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?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},function(t,r,n){"use strict";var e=n(0),i=n(2),o=n(1),s=e.rotr64_hi,h=e.rotr64_lo,u=e.shr64_hi,a=e.shr64_lo,c=e.sum64,f=e.sum64_hi,l=e.sum64_lo,p=e.sum64_4_hi,d=e.sum64_4_lo,g=e.sum64_5_hi,y=e.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,r,n,e,i){var o=t&n^~t&i;return o<0&&(o+=4294967296),o}function _(t,r,n,e,i,o){var s=r&e^~r&o;return s<0&&(s+=4294967296),s}function x(t,r,n,e,i){var o=t&n^t&i^n&i;return o<0&&(o+=4294967296),o}function S(t,r,n,e,i,o){var s=r&e^r&o^e&o;return s<0&&(s+=4294967296),s}function k(t,r){var n=s(t,r,28)^s(r,t,2)^s(r,t,7);return n<0&&(n+=4294967296),n}function A(t,r){var n=h(t,r,28)^h(r,t,2)^h(r,t,7);return n<0&&(n+=4294967296),n}function L(t,r){var n=s(t,r,14)^s(t,r,18)^s(r,t,9);return n<0&&(n+=4294967296),n}function z(t,r){var n=h(t,r,14)^h(t,r,18)^h(r,t,9);return n<0&&(n+=4294967296),n}function j(t,r){var n=s(t,r,1)^s(t,r,8)^u(t,r,7);return n<0&&(n+=4294967296),n}function E(t,r){var n=h(t,r,1)^h(t,r,8)^a(t,r,7);return n<0&&(n+=4294967296),n}function T(t,r){var n=s(t,r,19)^s(r,t,29)^u(t,r,6);return n<0&&(n+=4294967296),n}function C(t,r){var n=h(t,r,19)^h(r,t,29)^a(t,r,6);return n<0&&(n+=4294967296),n}e.inherits(w,v),t.exports=w,w.blockSize=1024,w.outSize=512,w.hmacStrength=192,w.padLength=128,w.prototype._prepareBlock=function(t,r){for(var n=this.W,e=0;e<32;e++)n[e]=t[r+e];for(;e<n.length;e+=2){var i=T(n[e-4],n[e-3]),o=C(n[e-4],n[e-3]),s=n[e-14],h=n[e-13],u=j(n[e-30],n[e-29]),a=E(n[e-30],n[e-29]),c=n[e-32],f=n[e-31];n[e]=p(i,o,s,h,u,a,c,f),n[e+1]=d(i,o,s,h,u,a,c,f)}},w.prototype._update=function(t,r){this._prepareBlock(t,r);var n=this.W,e=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],j=this.h[11],E=this.h[12],T=this.h[13],C=this.h[14],H=this.h[15];o(this.k.length===n.length);for(var O=0;O<n.length;O+=2){var B=C,N=H,P=L(v,m),W=z(v,m),M=b(v,m,w,j,E),G=_(v,m,w,j,E,T),I=this.k[O],U=this.k[O+1],F=n[O],R=n[O+1],q=g(B,N,P,W,M,G,I,U,F,R),D=y(B,N,P,W,M,G,I,U,F,R);B=k(e,i),N=A(e,i),P=x(e,i,s,h,u),W=S(e,i,s,h,u,a);var Y=f(B,N,P,W),Z=l(B,N,P,W);C=E,H=T,E=w,T=j,w=v,j=m,v=f(p,d,q,D),m=l(d,d,q,D),p=u,d=a,u=s,a=h,s=e,h=i,e=f(q,D,Y,Z),i=l(q,D,Y,Z)}c(this.h,0,e,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,j),c(this.h,12,E,T),c(this.h,14,C,H)},w.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},function(t,r){function n(t,r,n,e,i,o,s){try{var h=t[o](s),u=h.value}catch(t){return void n(t)}h.done?r(u):Promise.resolve(u).then(e,i)}t.exports=function(t){return function(){var r=this,e=arguments;return new Promise(function(i,o){var s=t.apply(r,e);function h(t){n(s,i,o,h,u,"next",t)}function u(t){n(s,i,o,h,u,"throw",t)}h(void 0)})}}},function(t,r,n){var e,i,o,s,h;e=n(15),i=n(5).utf8,o=n(16),s=n(5).bin,(h=function(t,r){t.constructor==String?t=r&&"binary"===r.encoding?s.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var n=e.bytesToWords(t),u=8*t.length,a=1732584193,c=-271733879,f=-1732584194,l=271733878,p=0;p<n.length;p++)n[p]=16711935&(n[p]<<8|n[p]>>>24)|4278255360&(n[p]<<24|n[p]>>>8);n[u>>>5]|=128<<u%32,n[14+(u+64>>>9<<4)]=u;var d=h._ff,g=h._gg,y=h._hh,v=h._ii;for(p=0;p<n.length;p+=16){var m=a,w=c,b=f,_=l;a=d(a,c,f,l,n[p+0],7,-680876936),l=d(l,a,c,f,n[p+1],12,-389564586),f=d(f,l,a,c,n[p+2],17,606105819),c=d(c,f,l,a,n[p+3],22,-1044525330),a=d(a,c,f,l,n[p+4],7,-176418897),l=d(l,a,c,f,n[p+5],12,1200080426),f=d(f,l,a,c,n[p+6],17,-1473231341),c=d(c,f,l,a,n[p+7],22,-45705983),a=d(a,c,f,l,n[p+8],7,1770035416),l=d(l,a,c,f,n[p+9],12,-1958414417),f=d(f,l,a,c,n[p+10],17,-42063),c=d(c,f,l,a,n[p+11],22,-1990404162),a=d(a,c,f,l,n[p+12],7,1804603682),l=d(l,a,c,f,n[p+13],12,-40341101),f=d(f,l,a,c,n[p+14],17,-1502002290),a=g(a,c=d(c,f,l,a,n[p+15],22,1236535329),f,l,n[p+1],5,-165796510),l=g(l,a,c,f,n[p+6],9,-1069501632),f=g(f,l,a,c,n[p+11],14,643717713),c=g(c,f,l,a,n[p+0],20,-373897302),a=g(a,c,f,l,n[p+5],5,-701558691),l=g(l,a,c,f,n[p+10],9,38016083),f=g(f,l,a,c,n[p+15],14,-660478335),c=g(c,f,l,a,n[p+4],20,-405537848),a=g(a,c,f,l,n[p+9],5,568446438),l=g(l,a,c,f,n[p+14],9,-1019803690),f=g(f,l,a,c,n[p+3],14,-187363961),c=g(c,f,l,a,n[p+8],20,1163531501),a=g(a,c,f,l,n[p+13],5,-1444681467),l=g(l,a,c,f,n[p+2],9,-51403784),f=g(f,l,a,c,n[p+7],14,1735328473),a=y(a,c=g(c,f,l,a,n[p+12],20,-1926607734),f,l,n[p+5],4,-378558),l=y(l,a,c,f,n[p+8],11,-2022574463),f=y(f,l,a,c,n[p+11],16,1839030562),c=y(c,f,l,a,n[p+14],23,-35309556),a=y(a,c,f,l,n[p+1],4,-1530992060),l=y(l,a,c,f,n[p+4],11,1272893353),f=y(f,l,a,c,n[p+7],16,-155497632),c=y(c,f,l,a,n[p+10],23,-1094730640),a=y(a,c,f,l,n[p+13],4,681279174),l=y(l,a,c,f,n[p+0],11,-358537222),f=y(f,l,a,c,n[p+3],16,-722521979),c=y(c,f,l,a,n[p+6],23,76029189),a=y(a,c,f,l,n[p+9],4,-640364487),l=y(l,a,c,f,n[p+12],11,-421815835),f=y(f,l,a,c,n[p+15],16,530742520),a=v(a,c=y(c,f,l,a,n[p+2],23,-995338651),f,l,n[p+0],6,-198630844),l=v(l,a,c,f,n[p+7],10,1126891415),f=v(f,l,a,c,n[p+14],15,-1416354905),c=v(c,f,l,a,n[p+5],21,-57434055),a=v(a,c,f,l,n[p+12],6,1700485571),l=v(l,a,c,f,n[p+3],10,-1894986606),f=v(f,l,a,c,n[p+10],15,-1051523),c=v(c,f,l,a,n[p+1],21,-2054922799),a=v(a,c,f,l,n[p+8],6,1873313359),l=v(l,a,c,f,n[p+15],10,-30611744),f=v(f,l,a,c,n[p+6],15,-1560198380),c=v(c,f,l,a,n[p+13],21,1309151649),a=v(a,c,f,l,n[p+4],6,-145523070),l=v(l,a,c,f,n[p+11],10,-1120210379),f=v(f,l,a,c,n[p+2],15,718787259),c=v(c,f,l,a,n[p+9],21,-343485551),a=a+m>>>0,c=c+w>>>0,f=f+b>>>0,l=l+_>>>0}return e.endian([a,c,f,l])})._ff=function(t,r,n,e,i,o,s){var h=t+(r&n|~r&e)+(i>>>0)+s;return(h<<o|h>>>32-o)+r},h._gg=function(t,r,n,e,i,o,s){var h=t+(r&e|n&~e)+(i>>>0)+s;return(h<<o|h>>>32-o)+r},h._hh=function(t,r,n,e,i,o,s){var h=t+(r^n^e)+(i>>>0)+s;return(h<<o|h>>>32-o)+r},h._ii=function(t,r,n,e,i,o,s){var h=t+(n^(r|~e))+(i>>>0)+s;return(h<<o|h>>>32-o)+r},h._blocksize=16,h._digestsize=16,t.exports=function(t,r){if(null==t)throw new Error("Illegal argument "+t);var n=e.wordsToBytes(h(t,r));return r&&r.asBytes?n:r&&r.asString?s.bytesToString(n):e.bytesToHex(n)}},function(t,r,n){var e=r;e.utils=n(0),e.common=n(2),e.sha=n(18),e.ripemd=n(22),e.hmac=n(23),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160},function(t,r,n){t.exports=n(24)},function(t,r,n){var e=function(t){"use strict";var r,n=Object.prototype,e=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",h=i.toStringTag||"@@toStringTag";function u(t,r,n,e){var i=r&&r.prototype instanceof g?r:g,o=Object.create(i.prototype),s=new z(e||[]);return o._invoke=function(t,r,n){var e=c;return function(i,o){if(e===l)throw new Error("Generator is already running");if(e===p){if("throw"===i)throw o;return E()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var h=k(s,n);if(h){if(h===d)continue;return h}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(e===c)throw e=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);e=l;var u=a(t,r,n);if("normal"===u.type){if(e=n.done?p:f,u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(e=p,n.method="throw",n.arg=u.arg)}}}(t,n,s),o}function a(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var c="suspendedStart",f="suspendedYield",l="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(j([])));b&&b!==n&&e.call(b,o)&&(m=b);var _=v.prototype=g.prototype=Object.create(m);function x(t){["next","throw","return"].forEach(function(r){t[r]=function(t){return this._invoke(r,t)}})}function S(t){var r;this._invoke=function(n,i){function o(){return new Promise(function(r,o){!function r(n,i,o,s){var h=a(t[n],t,i);if("throw"!==h.type){var u=h.arg,c=u.value;return c&&"object"==typeof c&&e.call(c,"__await")?Promise.resolve(c.__await).then(function(t){r("next",t,o,s)},function(t){r("throw",t,o,s)}):Promise.resolve(c).then(function(t){u.value=t,o(u)},function(t){return r("throw",t,o,s)})}s(h.arg)}(n,i,r,o)})}return r=r?r.then(o,o):o()}}function k(t,n){var e=t.iterator[n.method];if(e===r){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=r,k(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=a(e,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=r),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function L(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function z(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function j(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function n(){for(;++i<t.length;)if(e.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=r,n.done=!0,n};return s.next=s}}return{next:E}}function E(){return{value:r,done:!0}}return y.prototype=_.constructor=v,v.constructor=y,v[h]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===y||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,h in t||(t[h]="GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},x(S.prototype),S.prototype[s]=function(){return this},t.AsyncIterator=S,t.async=function(r,n,e,i){var o=new S(u(r,n,e,i));return t.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(_),_[h]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var n in t)r.push(n);return r.reverse(),function n(){for(;r.length;){var e=r.pop();if(e in t)return n.value=e,n.done=!1,n}return n.done=!0,n}},t.values=j,z.prototype={constructor:z,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(L),!t)for(var n in this)"t"===n.charAt(0)&&e.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=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 n=this;function i(e,i){return h.type="throw",h.arg=t,n.next=e,i&&(n.method="next",n.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 i("end");if(s.tryLoc<=this.prev){var u=e.call(s,"catchLoc"),a=e.call(s,"finallyLoc");if(u&&a){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&e.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=r,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,r){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&&r&&(this.next=r),d},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var e=n.completion;if("throw"===e.type){var i=e.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,e){return this.delegate={iterator:j(t),resultName:n,nextLoc:e},"next"===this.method&&(this.arg=r),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},function(r,n){r.exports=t},function(t,r){var n,e;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(t,r){return t<<r|t>>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&e.rotl(t,8)|4278255360&e.rotl(t,24);for(var r=0;r<t.length;r++)t[r]=e.endian(t[r]);return t},randomBytes:function(t){for(var r=[];t>0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],n=0,e=0;n<t.length;n++,e+=8)r[e>>>5]|=t[n]<<24-e%32;return r},wordsToBytes:function(t){for(var r=[],n=0;n<32*t.length;n+=8)r.push(t[n>>>5]>>>24-n%32&255);return r},bytesToHex:function(t){for(var r=[],n=0;n<t.length;n++)r.push((t[n]>>>4).toString(16)),r.push((15&t[n]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],n=0;n<t.length;n+=2)r.push(parseInt(t.substr(n,2),16));return r},bytesToBase64:function(t){for(var r=[],e=0;e<t.length;e+=3)for(var i=t[e]<<16|t[e+1]<<8|t[e+2],o=0;o<4;o++)8*e+6*o<=8*t.length?r.push(n.charAt(i>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],e=0,i=0;e<t.length;i=++e%4)0!=i&&r.push((n.indexOf(t.charAt(e-1))&Math.pow(2,-2*i+8)-1)<<2*i|n.indexOf(t.charAt(e))>>>6-2*i);return r}},t.exports=e},function(t,r){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)} | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],r):"object"==typeof exports?exports.jschash=r(require("crypto")):t.jschash=r(t.crypto)}(this,function(t){return function(t){var r={};function n(e){if(r[e])return r[e].exports;var i=r[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,r){if(1&r&&(t=n(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var i in t)n.d(e,i,function(r){return t[r]}.bind(null,i));return e},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.p="/home/circleci/repo/packages/js-crypto-hash/dist",n(n.s=12)}([function(t,r,n){"use strict";var e=n(1),i=n(17);function o(t,r){return 55296==(64512&t.charCodeAt(r))&&(!(r<0||r+1>=t.length)&&56320==(64512&t.charCodeAt(r+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}r.inherits=i,r.toArray=function(t,r){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(r){if("hex"===r)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var e=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?n[e++]=s:s<2048?(n[e++]=s>>6|192,n[e++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),n[e++]=s>>18|240,n[e++]=s>>12&63|128,n[e++]=s>>6&63|128,n[e++]=63&s|128):(n[e++]=s>>12|224,n[e++]=s>>6&63|128,n[e++]=63&s|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},r.toHex=function(t){for(var r="",n=0;n<t.length;n++)r+=h(t[n].toString(16));return r},r.htonl=s,r.toHex32=function(t,r){for(var n="",e=0;e<t.length;e++){var i=t[e];"little"===r&&(i=s(i)),n+=u(i.toString(16))}return n},r.zero2=h,r.zero8=u,r.join32=function(t,r,n,i){var o=n-r;e(o%4==0);for(var s=new Array(o/4),h=0,u=r;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},r.split32=function(t,r){for(var n=new Array(4*t.length),e=0,i=0;e<t.length;e++,i+=4){var o=t[e];"big"===r?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},r.rotr32=function(t,r){return t>>>r|t<<32-r},r.rotl32=function(t,r){return t<<r|t>>>32-r},r.sum32=function(t,r){return t+r>>>0},r.sum32_3=function(t,r,n){return t+r+n>>>0},r.sum32_4=function(t,r,n,e){return t+r+n+e>>>0},r.sum32_5=function(t,r,n,e,i){return t+r+n+e+i>>>0},r.sum64=function(t,r,n,e){var i=t[r],o=e+t[r+1]>>>0,s=(o<e?1:0)+n+i;t[r]=s>>>0,t[r+1]=o},r.sum64_hi=function(t,r,n,e){return(r+e>>>0<r?1:0)+t+n>>>0},r.sum64_lo=function(t,r,n,e){return r+e>>>0},r.sum64_4_hi=function(t,r,n,e,i,o,s,h){var u=0,a=r;return u+=(a=a+e>>>0)<r?1:0,u+=(a=a+o>>>0)<o?1:0,t+n+i+s+(u+=(a=a+h>>>0)<h?1:0)>>>0},r.sum64_4_lo=function(t,r,n,e,i,o,s,h){return r+e+o+h>>>0},r.sum64_5_hi=function(t,r,n,e,i,o,s,h,u,a){var c=0,f=r;return c+=(f=f+e>>>0)<r?1:0,c+=(f=f+o>>>0)<o?1:0,c+=(f=f+h>>>0)<h?1:0,t+n+i+s+u+(c+=(f=f+a>>>0)<a?1:0)>>>0},r.sum64_5_lo=function(t,r,n,e,i,o,s,h,u,a){return r+e+o+h+a>>>0},r.rotr64_hi=function(t,r,n){return(r<<32-n|t>>>n)>>>0},r.rotr64_lo=function(t,r,n){return(t<<32-n|r>>>n)>>>0},r.shr64_hi=function(t,r,n){return t>>>n},r.shr64_lo=function(t,r,n){return(t<<32-n|r>>>n)>>>0}},function(t,r){function n(t,r){if(!t)throw new Error(r||"Assertion failed")}t.exports=n,n.equal=function(t,r,n){if(t!=r)throw new Error(n||"Assertion failed: "+t+" != "+r)}},function(t,r,n){"use strict";var e=n(0),i=n(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}r.BlockHash=o,o.prototype.update=function(t,r){if(t=e.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-n,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,r=this._delta8,n=r-(t+this.padLength)%r,e=new Array(n+this.padLength);e[0]=128;for(var i=1;i<n;i++)e[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)e[i++]=0;e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=t>>>24&255,e[i++]=t>>>16&255,e[i++]=t>>>8&255,e[i++]=255&t}else for(e[i++]=255&t,e[i++]=t>>>8&255,e[i++]=t>>>16&255,e[i++]=t>>>24&255,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,o=8;o<this.padLength;o++)e[i++]=0;return e}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getRootWebCryptoAll=r.getWebCryptoAll=r.getMsCrypto=r.getWebCrypto=r.getNodeCrypto=r.default=void 0;var e=function(){return"undefined"!=typeof window?void 0:n(14)};r.getNodeCrypto=e;var i=function(){if("undefined"!=typeof window)return window.crypto?window.crypto.subtle:void 0};r.getWebCrypto=i;var o=function(){if("undefined"!=typeof window)return window.msCrypto?window.msCrypto.subtle:window.crypto?window.crypto.subtle:void 0};r.getWebCryptoAll=o;var s=function(){if("undefined"!=typeof window)return window.msCrypto?window.msCrypto:window.crypto?window.crypto:void 0};r.getRootWebCryptoAll=s;var h=function(){if("undefined"!=typeof window&&!window.crypto)return window.msCrypto?window.msCrypto.subtle:void 0};r.getMsCrypto=h;var u={getNodeCrypto:e,getWebCrypto:i,getMsCrypto:h,getWebCryptoAll:o,getRootWebCryptoAll:s};r.default=u},function(t,r,n){t.exports=n(13)},function(t,r){var n={utf8:{stringToBytes:function(t){return n.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(n.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],n=0;n<t.length;n++)r.push(255&t.charCodeAt(n));return r},bytesToString:function(t){for(var r=[],n=0;n<t.length;n++)r.push(String.fromCharCode(t[n]));return r.join("")}}};t.exports=n},function(t,r,n){"use strict";var e=n(0).rotr32;function i(t,r,n){return t&r^~t&n}function o(t,r,n){return t&r^t&n^r&n}function s(t,r,n){return t^r^n}r.ft_1=function(t,r,n,e){return 0===t?i(r,n,e):1===t||3===t?s(r,n,e):2===t?o(r,n,e):void 0},r.ch32=i,r.maj32=o,r.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},r.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},r.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},r.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10}},function(t,r,n){"use strict";var e=n(0),i=n(2),o=n(6),s=n(1),h=e.sum32,u=e.sum32_4,a=e.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)}e.inherits(m,y),t.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(t,r){for(var n=this.W,e=0;e<16;e++)n[e]=t[r+e];for(;e<n.length;e++)n[e]=u(g(n[e-2]),n[e-7],d(n[e-15]),n[e-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===n.length),e=0;e<n.length;e++){var x=a(_,p(m),c(m,w,b),this.k[e],n[e]),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?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},function(t,r,n){"use strict";var e=n(0),i=n(2),o=n(1),s=e.rotr64_hi,h=e.rotr64_lo,u=e.shr64_hi,a=e.shr64_lo,c=e.sum64,f=e.sum64_hi,l=e.sum64_lo,p=e.sum64_4_hi,d=e.sum64_4_lo,g=e.sum64_5_hi,y=e.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,r,n,e,i){var o=t&n^~t&i;return o<0&&(o+=4294967296),o}function _(t,r,n,e,i,o){var s=r&e^~r&o;return s<0&&(s+=4294967296),s}function x(t,r,n,e,i){var o=t&n^t&i^n&i;return o<0&&(o+=4294967296),o}function S(t,r,n,e,i,o){var s=r&e^r&o^e&o;return s<0&&(s+=4294967296),s}function k(t,r){var n=s(t,r,28)^s(r,t,2)^s(r,t,7);return n<0&&(n+=4294967296),n}function A(t,r){var n=h(t,r,28)^h(r,t,2)^h(r,t,7);return n<0&&(n+=4294967296),n}function L(t,r){var n=s(t,r,14)^s(t,r,18)^s(r,t,9);return n<0&&(n+=4294967296),n}function z(t,r){var n=h(t,r,14)^h(t,r,18)^h(r,t,9);return n<0&&(n+=4294967296),n}function j(t,r){var n=s(t,r,1)^s(t,r,8)^u(t,r,7);return n<0&&(n+=4294967296),n}function C(t,r){var n=h(t,r,1)^h(t,r,8)^a(t,r,7);return n<0&&(n+=4294967296),n}function E(t,r){var n=s(t,r,19)^s(r,t,29)^u(t,r,6);return n<0&&(n+=4294967296),n}function T(t,r){var n=h(t,r,19)^h(r,t,29)^a(t,r,6);return n<0&&(n+=4294967296),n}e.inherits(w,v),t.exports=w,w.blockSize=1024,w.outSize=512,w.hmacStrength=192,w.padLength=128,w.prototype._prepareBlock=function(t,r){for(var n=this.W,e=0;e<32;e++)n[e]=t[r+e];for(;e<n.length;e+=2){var i=E(n[e-4],n[e-3]),o=T(n[e-4],n[e-3]),s=n[e-14],h=n[e-13],u=j(n[e-30],n[e-29]),a=C(n[e-30],n[e-29]),c=n[e-32],f=n[e-31];n[e]=p(i,o,s,h,u,a,c,f),n[e+1]=d(i,o,s,h,u,a,c,f)}},w.prototype._update=function(t,r){this._prepareBlock(t,r);var n=this.W,e=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],j=this.h[11],C=this.h[12],E=this.h[13],T=this.h[14],H=this.h[15];o(this.k.length===n.length);for(var O=0;O<n.length;O+=2){var B=T,N=H,W=L(v,m),P=z(v,m),M=b(v,m,w,j,C),G=_(v,m,w,j,C,E),I=this.k[O],U=this.k[O+1],F=n[O],R=n[O+1],q=g(B,N,W,P,M,G,I,U,F,R),D=y(B,N,W,P,M,G,I,U,F,R);B=k(e,i),N=A(e,i),W=x(e,i,s,h,u),P=S(e,i,s,h,u,a);var Y=f(B,N,W,P),Z=l(B,N,W,P);T=C,H=E,C=w,E=j,w=v,j=m,v=f(p,d,q,D),m=l(d,d,q,D),p=u,d=a,u=s,a=h,s=e,h=i,e=f(q,D,Y,Z),i=l(q,D,Y,Z)}c(this.h,0,e,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,j),c(this.h,12,C,E),c(this.h,14,T,H)},w.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},function(t,r){function n(t,r,n,e,i,o,s){try{var h=t[o](s),u=h.value}catch(t){return void n(t)}h.done?r(u):Promise.resolve(u).then(e,i)}t.exports=function(t){return function(){var r=this,e=arguments;return new Promise(function(i,o){var s=t.apply(r,e);function h(t){n(s,i,o,h,u,"next",t)}function u(t){n(s,i,o,h,u,"throw",t)}h(void 0)})}}},function(t,r,n){var e,i,o,s,h;e=n(15),i=n(5).utf8,o=n(16),s=n(5).bin,(h=function(t,r){t.constructor==String?t=r&&"binary"===r.encoding?s.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());for(var n=e.bytesToWords(t),u=8*t.length,a=1732584193,c=-271733879,f=-1732584194,l=271733878,p=0;p<n.length;p++)n[p]=16711935&(n[p]<<8|n[p]>>>24)|4278255360&(n[p]<<24|n[p]>>>8);n[u>>>5]|=128<<u%32,n[14+(u+64>>>9<<4)]=u;var d=h._ff,g=h._gg,y=h._hh,v=h._ii;for(p=0;p<n.length;p+=16){var m=a,w=c,b=f,_=l;a=d(a,c,f,l,n[p+0],7,-680876936),l=d(l,a,c,f,n[p+1],12,-389564586),f=d(f,l,a,c,n[p+2],17,606105819),c=d(c,f,l,a,n[p+3],22,-1044525330),a=d(a,c,f,l,n[p+4],7,-176418897),l=d(l,a,c,f,n[p+5],12,1200080426),f=d(f,l,a,c,n[p+6],17,-1473231341),c=d(c,f,l,a,n[p+7],22,-45705983),a=d(a,c,f,l,n[p+8],7,1770035416),l=d(l,a,c,f,n[p+9],12,-1958414417),f=d(f,l,a,c,n[p+10],17,-42063),c=d(c,f,l,a,n[p+11],22,-1990404162),a=d(a,c,f,l,n[p+12],7,1804603682),l=d(l,a,c,f,n[p+13],12,-40341101),f=d(f,l,a,c,n[p+14],17,-1502002290),a=g(a,c=d(c,f,l,a,n[p+15],22,1236535329),f,l,n[p+1],5,-165796510),l=g(l,a,c,f,n[p+6],9,-1069501632),f=g(f,l,a,c,n[p+11],14,643717713),c=g(c,f,l,a,n[p+0],20,-373897302),a=g(a,c,f,l,n[p+5],5,-701558691),l=g(l,a,c,f,n[p+10],9,38016083),f=g(f,l,a,c,n[p+15],14,-660478335),c=g(c,f,l,a,n[p+4],20,-405537848),a=g(a,c,f,l,n[p+9],5,568446438),l=g(l,a,c,f,n[p+14],9,-1019803690),f=g(f,l,a,c,n[p+3],14,-187363961),c=g(c,f,l,a,n[p+8],20,1163531501),a=g(a,c,f,l,n[p+13],5,-1444681467),l=g(l,a,c,f,n[p+2],9,-51403784),f=g(f,l,a,c,n[p+7],14,1735328473),a=y(a,c=g(c,f,l,a,n[p+12],20,-1926607734),f,l,n[p+5],4,-378558),l=y(l,a,c,f,n[p+8],11,-2022574463),f=y(f,l,a,c,n[p+11],16,1839030562),c=y(c,f,l,a,n[p+14],23,-35309556),a=y(a,c,f,l,n[p+1],4,-1530992060),l=y(l,a,c,f,n[p+4],11,1272893353),f=y(f,l,a,c,n[p+7],16,-155497632),c=y(c,f,l,a,n[p+10],23,-1094730640),a=y(a,c,f,l,n[p+13],4,681279174),l=y(l,a,c,f,n[p+0],11,-358537222),f=y(f,l,a,c,n[p+3],16,-722521979),c=y(c,f,l,a,n[p+6],23,76029189),a=y(a,c,f,l,n[p+9],4,-640364487),l=y(l,a,c,f,n[p+12],11,-421815835),f=y(f,l,a,c,n[p+15],16,530742520),a=v(a,c=y(c,f,l,a,n[p+2],23,-995338651),f,l,n[p+0],6,-198630844),l=v(l,a,c,f,n[p+7],10,1126891415),f=v(f,l,a,c,n[p+14],15,-1416354905),c=v(c,f,l,a,n[p+5],21,-57434055),a=v(a,c,f,l,n[p+12],6,1700485571),l=v(l,a,c,f,n[p+3],10,-1894986606),f=v(f,l,a,c,n[p+10],15,-1051523),c=v(c,f,l,a,n[p+1],21,-2054922799),a=v(a,c,f,l,n[p+8],6,1873313359),l=v(l,a,c,f,n[p+15],10,-30611744),f=v(f,l,a,c,n[p+6],15,-1560198380),c=v(c,f,l,a,n[p+13],21,1309151649),a=v(a,c,f,l,n[p+4],6,-145523070),l=v(l,a,c,f,n[p+11],10,-1120210379),f=v(f,l,a,c,n[p+2],15,718787259),c=v(c,f,l,a,n[p+9],21,-343485551),a=a+m>>>0,c=c+w>>>0,f=f+b>>>0,l=l+_>>>0}return e.endian([a,c,f,l])})._ff=function(t,r,n,e,i,o,s){var h=t+(r&n|~r&e)+(i>>>0)+s;return(h<<o|h>>>32-o)+r},h._gg=function(t,r,n,e,i,o,s){var h=t+(r&e|n&~e)+(i>>>0)+s;return(h<<o|h>>>32-o)+r},h._hh=function(t,r,n,e,i,o,s){var h=t+(r^n^e)+(i>>>0)+s;return(h<<o|h>>>32-o)+r},h._ii=function(t,r,n,e,i,o,s){var h=t+(n^(r|~e))+(i>>>0)+s;return(h<<o|h>>>32-o)+r},h._blocksize=16,h._digestsize=16,t.exports=function(t,r){if(null==t)throw new Error("Illegal argument "+t);var n=e.wordsToBytes(h(t,r));return r&&r.asBytes?n:r&&r.asString?s.bytesToString(n):e.bytesToHex(n)}},function(t,r,n){var e=r;e.utils=n(0),e.common=n(2),e.sha=n(18),e.ripemd=n(22),e.hmac=n(23),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160},function(t,r,n){t.exports=n(24)},function(t,r,n){var e=function(t){"use strict";var r,n=Object.prototype,e=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",h=i.toStringTag||"@@toStringTag";function u(t,r,n,e){var i=r&&r.prototype instanceof g?r:g,o=Object.create(i.prototype),s=new z(e||[]);return o._invoke=function(t,r,n){var e=c;return function(i,o){if(e===l)throw new Error("Generator is already running");if(e===p){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var h=k(s,n);if(h){if(h===d)continue;return h}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(e===c)throw e=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);e=l;var u=a(t,r,n);if("normal"===u.type){if(e=n.done?p:f,u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(e=p,n.method="throw",n.arg=u.arg)}}}(t,n,s),o}function a(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var c="suspendedStart",f="suspendedYield",l="executing",p="completed",d={};function g(){}function y(){}function v(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(j([])));b&&b!==n&&e.call(b,o)&&(m=b);var _=v.prototype=g.prototype=Object.create(m);function x(t){["next","throw","return"].forEach(function(r){t[r]=function(t){return this._invoke(r,t)}})}function S(t){var r;this._invoke=function(n,i){function o(){return new Promise(function(r,o){!function r(n,i,o,s){var h=a(t[n],t,i);if("throw"!==h.type){var u=h.arg,c=u.value;return c&&"object"==typeof c&&e.call(c,"__await")?Promise.resolve(c.__await).then(function(t){r("next",t,o,s)},function(t){r("throw",t,o,s)}):Promise.resolve(c).then(function(t){u.value=t,o(u)},function(t){return r("throw",t,o,s)})}s(h.arg)}(n,i,r,o)})}return r=r?r.then(o,o):o()}}function k(t,n){var e=t.iterator[n.method];if(e===r){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=r,k(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=a(e,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=r),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function L(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function z(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function j(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function n(){for(;++i<t.length;)if(e.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=r,n.done=!0,n};return s.next=s}}return{next:C}}function C(){return{value:r,done:!0}}return y.prototype=_.constructor=v,v.constructor=y,v[h]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===y||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,h in t||(t[h]="GeneratorFunction")),t.prototype=Object.create(_),t},t.awrap=function(t){return{__await:t}},x(S.prototype),S.prototype[s]=function(){return this},t.AsyncIterator=S,t.async=function(r,n,e,i){var o=new S(u(r,n,e,i));return t.isGeneratorFunction(n)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(_),_[h]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},t.keys=function(t){var r=[];for(var n in t)r.push(n);return r.reverse(),function n(){for(;r.length;){var e=r.pop();if(e in t)return n.value=e,n.done=!1,n}return n.done=!0,n}},t.values=j,z.prototype={constructor:z,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(L),!t)for(var n in this)"t"===n.charAt(0)&&e.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=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 n=this;function i(e,i){return h.type="throw",h.arg=t,n.next=e,i&&(n.method="next",n.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 i("end");if(s.tryLoc<=this.prev){var u=e.call(s,"catchLoc"),a=e.call(s,"finallyLoc");if(u&&a){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&e.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=r,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,r){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&&r&&(this.next=r),d},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),d}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var e=n.completion;if("throw"===e.type){var i=e.arg;L(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,e){return this.delegate={iterator:j(t),resultName:n,nextLoc:e},"next"===this.method&&(this.arg=r),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}},function(r,n){r.exports=t},function(t,r){var n,e;n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e={rotl:function(t,r){return t<<r|t>>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&e.rotl(t,8)|4278255360&e.rotl(t,24);for(var r=0;r<t.length;r++)t[r]=e.endian(t[r]);return t},randomBytes:function(t){for(var r=[];t>0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],n=0,e=0;n<t.length;n++,e+=8)r[e>>>5]|=t[n]<<24-e%32;return r},wordsToBytes:function(t){for(var r=[],n=0;n<32*t.length;n+=8)r.push(t[n>>>5]>>>24-n%32&255);return r},bytesToHex:function(t){for(var r=[],n=0;n<t.length;n++)r.push((t[n]>>>4).toString(16)),r.push((15&t[n]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],n=0;n<t.length;n+=2)r.push(parseInt(t.substr(n,2),16));return r},bytesToBase64:function(t){for(var r=[],e=0;e<t.length;e+=3)for(var i=t[e]<<16|t[e+1]<<8|t[e+2],o=0;o<4;o++)8*e+6*o<=8*t.length?r.push(n.charAt(i>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],e=0,i=0;e<t.length;i=++e%4)0!=i&&r.push((n.indexOf(t.charAt(e-1))&Math.pow(2,-2*i+8)-1)<<2*i|n.indexOf(t.charAt(e))>>>6-2*i);return r}},t.exports=e},function(t,r){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)} | ||
/*! | ||
@@ -8,2 +8,2 @@ * Determine if an object is a Buffer | ||
*/ | ||
t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,r){"function"==typeof Object.create?t.exports=function(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,r,n){"use strict";r.sha1=n(19),r.sha224=n(20),r.sha256=n(7),r.sha384=n(21),r.sha512=n(8)},function(t,r,n){"use strict";var e=n(0),i=n(2),o=n(6),s=e.rotl32,h=e.sum32,u=e.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)}e.inherits(l,c),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,r){for(var n=this.W,e=0;e<16;e++)n[e]=t[r+e];for(;e<n.length;e++)n[e]=s(n[e-3]^n[e-8]^n[e-14]^n[e-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],l=this.h[3],p=this.h[4];for(e=0;e<n.length;e++){var d=~~(e/20),g=u(s(i,5),a(d,o,c,l),p,n[e],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?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},function(t,r,n){"use strict";var e=n(0),i=n(7);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}e.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?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")}},function(t,r,n){"use strict";var e=n(0),i=n(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]}e.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?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")}},function(t,r,n){"use strict";var e=n(0),i=n(2),o=e.rotl32,s=e.sum32,h=e.sum32_3,u=e.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,r,n,e){return t<=15?r^n^e:t<=31?r&n|~r&e:t<=47?(r|~n)^e:t<=63?r&e|n&~e:r^(n|~e)}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}e.inherits(c,a),r.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,r){for(var n=this.h[0],e=this.h[1],i=this.h[2],a=this.h[3],c=this.h[4],m=n,w=e,b=i,_=a,x=c,S=0;S<80;S++){var k=s(o(u(n,f(S,e,i,a),t[d[S]+r],l(S)),y[S]),c);n=c,c=a,a=o(i,10),i=e,e=k,k=s(o(u(m,f(79-S,w,b,_),t[g[S]+r],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],n,w),this.h[4]=h(this.h[0],e,b),this.h[0]=k},c.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.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,r,n){"use strict";var e=n(0),i=n(1);function o(t,r,n){if(!(this instanceof o))return new o(t,r,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(r,n))}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 r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=(new this.Hash).update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,r){return this.inner.update(t,r),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,r,n){"use strict";n.r(r);var e=n(4),i=n.n(e),o=n(9),s=n.n(o),h=n(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=n(10),c=n.n(a),f=n(11),l=n.n(f);function p(t){return d.apply(this,arguments)}function d(){return(d=s()(i.a.mark(function t(r){var n,e,o,s,a,c,f,l=arguments;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=l.length>1&&void 0!==l[1]?l[1]:"SHA-256",!(Object.keys(u.hashes).indexOf(n)<0)){t.next=3;break}throw new Error("UnsupportedHashAlgorithm");case 3:if(r instanceof Uint8Array){t.next=5;break}throw new Error("UnsupportedMessageType");case 5:if(e=h.getWebCrypto(),o=h.getNodeCrypto(),s=h.getMsCrypto(),f=!0,void 0===e||"function"!=typeof e.digest||void 0!==s){t.next=15;break}return t.next=12,e.digest(n,r).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(n,r,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(n,r,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(n,r),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,r,n){return new Promise(function(e,i){var o=n.digest(t,r);o.oncomplete=function(t){e(t.target.result)},o.onerror=function(t){i(t)}})},y=function(t,r,n){var e=u.hashes[t].nodeName,i=n.createHash(e);return i.update(r),i.digest()},v=function(t,r){var n;return n="MD5"===t?c()(Array.from(r),{asBytes:!0}):l.a[u.hashes[t].nodeName]().update(r).digest(),new Uint8Array(n)};n.d(r,"compute",function(){return p});r.default={compute:p}}])}); | ||
t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,r){"function"==typeof Object.create?t.exports=function(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,r,n){"use strict";r.sha1=n(19),r.sha224=n(20),r.sha256=n(7),r.sha384=n(21),r.sha512=n(8)},function(t,r,n){"use strict";var e=n(0),i=n(2),o=n(6),s=e.rotl32,h=e.sum32,u=e.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)}e.inherits(l,c),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,r){for(var n=this.W,e=0;e<16;e++)n[e]=t[r+e];for(;e<n.length;e++)n[e]=s(n[e-3]^n[e-8]^n[e-14]^n[e-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],l=this.h[3],p=this.h[4];for(e=0;e<n.length;e++){var d=~~(e/20),g=u(s(i,5),a(d,o,c,l),p,n[e],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?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},function(t,r,n){"use strict";var e=n(0),i=n(7);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}e.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?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")}},function(t,r,n){"use strict";var e=n(0),i=n(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]}e.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?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")}},function(t,r,n){"use strict";var e=n(0),i=n(2),o=e.rotl32,s=e.sum32,h=e.sum32_3,u=e.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,r,n,e){return t<=15?r^n^e:t<=31?r&n|~r&e:t<=47?(r|~n)^e:t<=63?r&e|n&~e:r^(n|~e)}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}e.inherits(c,a),r.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,r){for(var n=this.h[0],e=this.h[1],i=this.h[2],a=this.h[3],c=this.h[4],m=n,w=e,b=i,_=a,x=c,S=0;S<80;S++){var k=s(o(u(n,f(S,e,i,a),t[d[S]+r],l(S)),y[S]),c);n=c,c=a,a=o(i,10),i=e,e=k,k=s(o(u(m,f(79-S,w,b,_),t[g[S]+r],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],n,w),this.h[4]=h(this.h[0],e,b),this.h[0]=k},c.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.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,r,n){"use strict";var e=n(0),i=n(1);function o(t,r,n){if(!(this instanceof o))return new o(t,r,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(r,n))}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 r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=(new this.Hash).update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,r){return this.inner.update(t,r),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,r,n){"use strict";n.r(r);var e=n(4),i=n.n(e),o=n(9),s=n.n(o),h=n(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=n(10),c=n.n(a),f=n(11),l=n.n(f),p=function(){var t=s()(i.a.mark(function t(r){var n,e,o,s,a,c,f,l=arguments;return i.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=l.length>1&&void 0!==l[1]?l[1]:"SHA-256",!(Object.keys(u.hashes).indexOf(n)<0)){t.next=3;break}throw new Error("UnsupportedHashAlgorithm");case 3:if(r instanceof Uint8Array){t.next=5;break}throw new Error("UnsupportedMessageType");case 5:if(e=h.getWebCrypto(),o=h.getNodeCrypto(),s=h.getMsCrypto(),f=!0,void 0===e||"function"!=typeof e.digest||void 0!==s){t.next=15;break}return t.next=12,e.digest(n,r).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=g(n,r,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,d(n,r,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=y(n,r),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]])}));return function(r){return t.apply(this,arguments)}}(),d=function(t,r,n){return new Promise(function(e,i){var o=n.digest(t,r);o.oncomplete=function(t){e(t.target.result)},o.onerror=function(t){i(t)}})},g=function(t,r,n){var e=u.hashes[t].nodeName,i=n.createHash(e);return i.update(r),i.digest()},y=function(t,r){var n;return n="MD5"===t?c()(Array.from(r),{asBytes:!0}):l.a[u.hashes[t].nodeName]().update(r).digest(),new Uint8Array(n)};n.d(r,"compute",function(){return p});r.default={compute:p}}])}); |
{ | ||
"name": "js-crypto-hash", | ||
"version": "0.3.6", | ||
"version": "0.4.0", | ||
"description": "Universal Module for Hash Function in JavaScript", | ||
@@ -41,5 +41,5 @@ "main": "dist/index.js", | ||
"hash.js": "^1.1.7", | ||
"js-crypto-env": "^0.1.4", | ||
"js-crypto-env": "^0.2.0", | ||
"md5": "^2.2.1" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44569
333
+ Added@babel/runtime@7.5.5(transitive)
+ Addedjs-crypto-env@0.2.4(transitive)
+ Addedregenerator-runtime@0.13.11(transitive)
- Removedjs-crypto-env@0.1.4(transitive)
Updatedjs-crypto-env@^0.2.0