diff --git a/CHANGELOG.md b/CHANGELOG.md index 11f14b2..2f8b2c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## [1.0.2] +### Fixed +- Fixed an issue where invalid Hex string could be parsed without error. + For example, invalid Hex string `1g` was recognized as `0x01`. + ## [1.0.1] - 2021-06-20 ### Fixed - Fixed an issue where building jscrypto with webpack shows warning messages like below: @@ -93,6 +98,7 @@ Initial release. +[1.0.2]: https://github.com/Hinaser/jscrypto/compare/v1.0.1...v1.0.2 [1.0.1]: https://github.com/Hinaser/jscrypto/compare/v1.0.0...v1.0.1 [1.0.0]: https://github.com/Hinaser/jscrypto/compare/v0.2.0...v1.0.0 [0.2.0]: https://github.com/Hinaser/jscrypto/compare/v0.1.0...v0.2.0 diff --git a/dist/AES.js b/dist/AES.js index 6da4abb..afd61c1 100644 --- a/dist/AES.js +++ b/dist/AES.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.i=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.u=t.clone(),u=this.h=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=l+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.N=function(){var n=this.k.words,t=8*this.I,r=8*this.k.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.k.nSigBytes=4*n.length,this.S(),this.v},t.prototype.clone=function(){return new t({hash:this.v,blockSize:this.U,data:this.k,nBytes:this.I})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.F=Array.isArray(t)?t:[],void(this.H="number"==typeof r?r:4*this.F.length);if(t instanceof n)return this.F=t.words.slice(),void(this.H=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.F=o,this.H=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.H},set:function(n){this.H=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.F},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.F,t=this.H,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.H%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.F[this.H+i>>>2]|=e<<24-(this.H+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.H+=r,this},n.prototype.clamp=function(){var n=this.H;this.F[n>>>2]&=4294967295<<32-n%4*8,this.F.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.F.slice(),this.H)},n.random=function(t){for(var r=[],i=0;i>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"en",{value:!0})};var i={};return function(){r.r(i),r.d(i,{AES:function(){return j}});var n,t=r(9456),e=r(787),o=r(5693),u=r(9109),f=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),c=function(){return(c=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>8^255&e^99,s[r]=e,a[e]=r;var o=n[r],u=n[o],f=n[u],c=257*n[e]^16843008*e;h[r]=c<<24|c>>>8,v[r]=c<<16|c>>>16,w[r]=c<<8|c>>>24,d[r]=c,c=16843009*f^65537*u^257*o^16843008*r,l[e]=c<<24|c>>>8,b[e]=c<<16|c>>>16,y[e]=c<<8|c>>>24,p[e]=c,r?(r=o^n[n[n[f^o]]],i^=n[n[i]]):r=i=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],j=function(n){function r(t){var r=n.call(this,t)||this;return r.on=0,r.un=[],r.fn=[],r.j=t,r.O(),r}return f(r,n),r.prototype.O=function(){var n;if(!this.on||this.cn!==this.Y){for(var t=this.cn=this.Y,r=t.words,i=t.nSigBytes/4,e=4*((this.on=i+6)+1),o=this.un=[],u=0;u6&&u%i==4&&(n=s[n>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[255&n]):(n=s[(n=n<<8|n>>>24)>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[255&n],n^=m[u/i|0]<<24),o[u]=o[u-i]^n);this.fn=[];for(var f=0;f>>24]]^b[s[n>>>16&255]]^y[s[n>>>8&255]]^p[s[255&n]]}}},r.prototype.encryptBlock=function(n,t){this.sn(n,t,this.un,h,v,w,d,s)},r.prototype.decryptBlock=function(n,t){var r=n[t+1];n[t+1]=n[t+3],n[t+3]=r,this.sn(n,t,this.fn,l,b,y,p,a),r=n[t+1],n[t+1]=n[t+3],n[t+3]=r},r.prototype.sn=function(n,t,r,i,e,o,u,f){for(var c=this.on,s=n[t]^r[0],a=n[t+1]^r[1],h=n[t+2]^r[2],v=n[t+3]^r[3],w=4,d=1;d>>24]^e[a>>>16&255]^o[h>>>8&255]^u[255&v]^r[w++],b=i[a>>>24]^e[h>>>16&255]^o[v>>>8&255]^u[255&s]^r[w++],y=i[h>>>24]^e[v>>>16&255]^o[s>>>8&255]^u[255&a]^r[w++],p=i[v>>>24]^e[s>>>16&255]^o[a>>>8&255]^u[255&h]^r[w++];s=l,a=b,h=y,v=p}var m=(f[s>>>24]<<24|f[a>>>16&255]<<16|f[h>>>8&255]<<8|f[255&v])^r[w++],j=(f[a>>>24]<<24|f[h>>>16&255]<<16|f[v>>>8&255]<<8|f[255&s])^r[w++],O=(f[h>>>24]<<24|f[v>>>16&255]<<16|f[s>>>8&255]<<8|f[255&a])^r[w++],g=(f[v>>>24]<<24|f[s>>>16&255]<<16|f[a>>>8&255]<<8|f[255&h])^r[w++];n[t]=m,n[t+1]=j,n[t+2]=O,n[t+3]=g},r.createEncryptor=function(n,i){return new r(c(c({},i=void 0===i?{}:i),{key:n,transformMode:t.t.ENC_TRANSFORM_MODE}))},r.createDecryptor=function(n,i){return new r(c(c({},i=void 0===i?{}:i),{key:n,transformMode:t.t.DEC_TRANSFORM_MODE}))},r.encrypt=function(n,t,i){if("string"==typeof t)return o.E.encrypt(r,n,t,i);if(t.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return u.D.encrypt(r,n,t,i)},r.decrypt=function(n,t,i){if("string"==typeof t)return o.E.decrypt(r,n,t,i);if(t.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return u.D.decrypt(r,n,t,i)},r.keySize=8,r}(e.G)}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.i=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.u=t.clone(),u=this.h=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=l+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.N=function(){var n=this.k.words,t=8*this.I,r=8*this.k.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.k.nSigBytes=4*n.length,this.S(),this.v},t.prototype.clone=function(){return new t({hash:this.v,blockSize:this.U,data:this.k,nBytes:this.I})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.F=Array.isArray(t)?t:[],void(this.H="number"==typeof r?r:4*this.F.length);if(t instanceof n)return this.F=t.words.slice(),void(this.H=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.F=o,this.H=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.H},set:function(n){this.H=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.F},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.F,t=this.H,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.H%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.F[this.H+i>>>2]|=e<<24-(this.H+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.H+=r,this},n.prototype.clamp=function(){var n=this.H;this.F[n>>>2]&=4294967295<<32-n%4*8,this.F.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.F.slice(),this.H)},n.random=function(t){for(var r=[],i=0;i>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"en",{value:!0})};var i={};return function(){r.r(i),r.d(i,{AES:function(){return j}});var n,t=r(9456),e=r(787),o=r(5693),u=r(9109),f=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),c=function(){return(c=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>8^255&e^99,s[r]=e,a[e]=r;var o=n[r],u=n[o],f=n[u],c=257*n[e]^16843008*e;h[r]=c<<24|c>>>8,v[r]=c<<16|c>>>16,w[r]=c<<8|c>>>24,d[r]=c,c=16843009*f^65537*u^257*o^16843008*r,l[e]=c<<24|c>>>8,b[e]=c<<16|c>>>16,y[e]=c<<8|c>>>24,p[e]=c,r?(r=o^n[n[n[f^o]]],i^=n[n[i]]):r=i=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],j=function(n){function r(t){var r=n.call(this,t)||this;return r.on=0,r.un=[],r.fn=[],r.j=t,r.O(),r}return f(r,n),r.prototype.O=function(){var n;if(!this.on||this.cn!==this.Y){for(var t=this.cn=this.Y,r=t.words,i=t.nSigBytes/4,e=4*((this.on=i+6)+1),o=this.un=[],u=0;u6&&u%i==4&&(n=s[n>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[255&n]):(n=s[(n=n<<8|n>>>24)>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[255&n],n^=m[u/i|0]<<24),o[u]=o[u-i]^n);this.fn=[];for(var f=0;f>>24]]^b[s[n>>>16&255]]^y[s[n>>>8&255]]^p[s[255&n]]}}},r.prototype.encryptBlock=function(n,t){this.sn(n,t,this.un,h,v,w,d,s)},r.prototype.decryptBlock=function(n,t){var r=n[t+1];n[t+1]=n[t+3],n[t+3]=r,this.sn(n,t,this.fn,l,b,y,p,a),r=n[t+1],n[t+1]=n[t+3],n[t+3]=r},r.prototype.sn=function(n,t,r,i,e,o,u,f){for(var c=this.on,s=n[t]^r[0],a=n[t+1]^r[1],h=n[t+2]^r[2],v=n[t+3]^r[3],w=4,d=1;d>>24]^e[a>>>16&255]^o[h>>>8&255]^u[255&v]^r[w++],b=i[a>>>24]^e[h>>>16&255]^o[v>>>8&255]^u[255&s]^r[w++],y=i[h>>>24]^e[v>>>16&255]^o[s>>>8&255]^u[255&a]^r[w++],p=i[v>>>24]^e[s>>>16&255]^o[a>>>8&255]^u[255&h]^r[w++];s=l,a=b,h=y,v=p}var m=(f[s>>>24]<<24|f[a>>>16&255]<<16|f[h>>>8&255]<<8|f[255&v])^r[w++],j=(f[a>>>24]<<24|f[h>>>16&255]<<16|f[v>>>8&255]<<8|f[255&s])^r[w++],O=(f[h>>>24]<<24|f[v>>>16&255]<<16|f[s>>>8&255]<<8|f[255&a])^r[w++],g=(f[v>>>24]<<24|f[s>>>16&255]<<16|f[a>>>8&255]<<8|f[255&h])^r[w++];n[t]=m,n[t+1]=j,n[t+2]=O,n[t+3]=g},r.createEncryptor=function(n,i){return new r(c(c({},i=void 0===i?{}:i),{key:n,transformMode:t.t.ENC_TRANSFORM_MODE}))},r.createDecryptor=function(n,i){return new r(c(c({},i=void 0===i?{}:i),{key:n,transformMode:t.t.DEC_TRANSFORM_MODE}))},r.encrypt=function(n,t,i){if("string"==typeof t)return o.E.encrypt(r,n,t,i);if(t.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return u.D.encrypt(r,n,t,i)},r.decrypt=function(n,t,i){if("string"==typeof t)return o.E.decrypt(r,n,t,i);if(t.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return u.D.decrypt(r,n,t,i)},r.keySize=8,r}(e.G)}(),i}()})); \ No newline at end of file diff --git a/dist/CBCMAC.js b/dist/CBCMAC.js index b114897..ea75af7 100644 --- a/dist/CBCMAC.js +++ b/dist/CBCMAC.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={9691:function(n,t,r){r.d(t,{AES:function(){return g}});var i,e=r(9456),o=r(787),u=r(5693),f=r(9109),c=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return(s=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>8^255&e^99,a[r]=e,h[e]=r;var o=n[r],u=n[o],f=n[u],c=257*n[e]^16843008*e;v[r]=c<<24|c>>>8,w[r]=c<<16|c>>>16,l[r]=c<<8|c>>>24,d[r]=c,c=16843009*f^65537*u^257*o^16843008*r,b[e]=c<<24|c>>>8,y[e]=c<<16|c>>>16,p[e]=c<<8|c>>>24,m[e]=c,r?(r=o^n[n[n[f^o]]],i^=n[n[i]]):r=i=1}}();var j=[0,1,2,4,8,16,32,64,128,27,54],g=function(n){function t(t){var r=n.call(this,t)||this;return r.i=0,r.u=[],r.h=[],r.v=t,r.j(),r}return c(t,n),t.prototype.j=function(){var n;if(!this.i||this.O!==this.A){for(var t=this.O=this.A,r=t.words,i=t.nSigBytes/4,e=4*((this.i=i+6)+1),o=this.u=[],u=0;u6&&u%i==4&&(n=a[n>>>24]<<24|a[n>>>16&255]<<16|a[n>>>8&255]<<8|a[255&n]):(n=a[(n=n<<8|n>>>24)>>>24]<<24|a[n>>>16&255]<<16|a[n>>>8&255]<<8|a[255&n],n^=j[u/i|0]<<24),o[u]=o[u-i]^n);this.h=[];for(var f=0;f>>24]]^y[a[n>>>16&255]]^p[a[n>>>8&255]]^m[a[255&n]]}}},t.prototype.encryptBlock=function(n,t){this.N(n,t,this.u,v,w,l,d,a)},t.prototype.decryptBlock=function(n,t){var r=n[t+1];n[t+1]=n[t+3],n[t+3]=r,this.N(n,t,this.h,b,y,p,m,h),r=n[t+1],n[t+1]=n[t+3],n[t+3]=r},t.prototype.N=function(n,t,r,i,e,o,u,f){for(var c=this.i,s=n[t]^r[0],a=n[t+1]^r[1],h=n[t+2]^r[2],v=n[t+3]^r[3],w=4,l=1;l>>24]^e[a>>>16&255]^o[h>>>8&255]^u[255&v]^r[w++],b=i[a>>>24]^e[h>>>16&255]^o[v>>>8&255]^u[255&s]^r[w++],y=i[h>>>24]^e[v>>>16&255]^o[s>>>8&255]^u[255&a]^r[w++],p=i[v>>>24]^e[s>>>16&255]^o[a>>>8&255]^u[255&h]^r[w++];s=d,a=b,h=y,v=p}var m=(f[s>>>24]<<24|f[a>>>16&255]<<16|f[h>>>8&255]<<8|f[255&v])^r[w++],j=(f[a>>>24]<<24|f[h>>>16&255]<<16|f[v>>>8&255]<<8|f[255&s])^r[w++],g=(f[h>>>24]<<24|f[v>>>16&255]<<16|f[s>>>8&255]<<8|f[255&a])^r[w++],O=(f[v>>>24]<<24|f[s>>>16&255]<<16|f[a>>>8&255]<<8|f[255&h])^r[w++];n[t]=m,n[t+1]=j,n[t+2]=g,n[t+3]=O},t.createEncryptor=function(n,r){return new t(s(s({},r=void 0===r?{}:r),{key:n,transformMode:e.t.ENC_TRANSFORM_MODE}))},t.createDecryptor=function(n,r){return new t(s(s({},r=void 0===r?{}:r),{key:n,transformMode:e.t.DEC_TRANSFORM_MODE}))},t.encrypt=function(n,r,i){if("string"==typeof r)return u.E.encrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){if("string"==typeof r)return u.E.decrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.decrypt(t,n,r,i)},t.keySize=8,t}(o.G)},6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.k=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.I=t.clone(),u=this.S=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(l<<14|l>>>18)^l>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=d+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.L=function(){var n=this.F.words,t=8*this.H,r=8*this.F.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.F.nSigBytes=4*n.length,this.R(),this.U},t.prototype.clone=function(){return new t({hash:this.U,blockSize:this.q,data:this.F,nBytes:this.H})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.J=Array.isArray(t)?t:[],void(this.V="number"==typeof r?r:4*this.J.length);if(t instanceof n)return this.J=t.words.slice(),void(this.V=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.J=o,this.V=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.V},set:function(n){this.V=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.J},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.J,t=this.V,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.V%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.J[this.V+i>>>2]|=e<<24-(this.V+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.V+=r,this},n.prototype.clamp=function(){var n=this.V;this.J[n>>>2]&=4294967295<<32-n%4*8,this.J.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.J.slice(),this.V)},n.random=function(t){for(var r=[],i=0;i>>2,f=r+o,c=f>>>2,s=n.words[c]>>>24-f%4*8&255;e[u]=0|e[u]|s<<24-o%4*8}var a=new i.e(e,t);return a.clamp(),a}},7919:function(n,t,r){r.d(t,{l:function(){return e}});var i=r(3354);var e={pad:function(n,t){for(var r=4*t,e=r-n.nSigBytes%r,o=e<<24|e<<16|e<<8|e,u=[],f=0;f>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()},3664:function(n,t,r){r.d(t,{K:function(){return c}});var i,e=r(1863),o=r(3354),u=r(4055),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(n){function t(t){var r=n.call(this,t)||this;r.an=1;var i=t.cipher,e=t.iv;if(4!==i.blockSize)throw new Error("In CCM, cipher block size must be 128bit");if(e&&(e.nSigBytes>13||e.nSigBytes<7))throw new Error("Byte size of iv must be between 7 and 13");return r.hn=e||new o.e([0,0],8),r.vn=15-r.hn.nSigBytes,r}return f(t,n),t.getB0=function(n,t,r,i){if(r.nSigBytes+i.nSigBytes!==15)throw new Error("LEN(Q)+LEN(N) must be 15");var e=255&(0|(n?1:0)<<6|(t-2)/2<<3|r.nSigBytes-1),u=i.clone().concat(r);return new o.e([e<<24],1).concat(u)},t.formatAssociatedDataAndPayload=function(n,t){var r,i=n.nSigBytes;if(0===i)r=new o.e([0],0);else if(i4?(e.concat(new o.e([0],n%4)),e.concat(new o.e([r],4))):e.concat(new o.e([r<<32-8*n],n)):e.concat(new o.e([r],4)),i.concat(t).concat(e)},t.mac=function(n,r,i,e,f,c){var s=new n({key:r,iv:i});if(4!==s.blockSize)throw new Error("In CCM, cipher block size must be 128bit");if(i&&(i.nSigBytes>13||i.nSigBytes<7))throw new Error("Byte size of iv must be between 7 and 13");var a=i||new o.e([0,0],8),h=(null==e?void 0:e.clone())||new o.e,v=h.nSigBytes,w=(null==f?void 0:f.clone())||new o.e,l=w.nSigBytes;if(l>>>0>4294967295)throw new Error("Byte length of Payload(plainText) larger than 2^32-1 (4,294,967,295byte) is not supported at this time.");var d=15-a.nSigBytes,b=(0,u.ur)(new o.e([0,l],8),d),y=c||16,p=t.getB0(Boolean(v),y,b,a),m=t.formatAssociatedDataAndPayload(h,w),j=p.words.slice();s.encryptBlock(j,0);for(var g=m.nSigBytes/16,O=m.words,E=j,_=0;_>>8^255&e^99,a[r]=e,h[e]=r;var o=n[r],u=n[o],f=n[u],c=257*n[e]^16843008*e;v[r]=c<<24|c>>>8,w[r]=c<<16|c>>>16,l[r]=c<<8|c>>>24,d[r]=c,c=16843009*f^65537*u^257*o^16843008*r,b[e]=c<<24|c>>>8,y[e]=c<<16|c>>>16,p[e]=c<<8|c>>>24,m[e]=c,r?(r=o^n[n[n[f^o]]],i^=n[n[i]]):r=i=1}}();var j=[0,1,2,4,8,16,32,64,128,27,54],g=function(n){function t(t){var r=n.call(this,t)||this;return r.i=0,r.u=[],r.h=[],r.v=t,r.j(),r}return c(t,n),t.prototype.j=function(){var n;if(!this.i||this.O!==this.A){for(var t=this.O=this.A,r=t.words,i=t.nSigBytes/4,e=4*((this.i=i+6)+1),o=this.u=[],u=0;u6&&u%i==4&&(n=a[n>>>24]<<24|a[n>>>16&255]<<16|a[n>>>8&255]<<8|a[255&n]):(n=a[(n=n<<8|n>>>24)>>>24]<<24|a[n>>>16&255]<<16|a[n>>>8&255]<<8|a[255&n],n^=j[u/i|0]<<24),o[u]=o[u-i]^n);this.h=[];for(var f=0;f>>24]]^y[a[n>>>16&255]]^p[a[n>>>8&255]]^m[a[255&n]]}}},t.prototype.encryptBlock=function(n,t){this.N(n,t,this.u,v,w,l,d,a)},t.prototype.decryptBlock=function(n,t){var r=n[t+1];n[t+1]=n[t+3],n[t+3]=r,this.N(n,t,this.h,b,y,p,m,h),r=n[t+1],n[t+1]=n[t+3],n[t+3]=r},t.prototype.N=function(n,t,r,i,e,o,u,f){for(var c=this.i,s=n[t]^r[0],a=n[t+1]^r[1],h=n[t+2]^r[2],v=n[t+3]^r[3],w=4,l=1;l>>24]^e[a>>>16&255]^o[h>>>8&255]^u[255&v]^r[w++],b=i[a>>>24]^e[h>>>16&255]^o[v>>>8&255]^u[255&s]^r[w++],y=i[h>>>24]^e[v>>>16&255]^o[s>>>8&255]^u[255&a]^r[w++],p=i[v>>>24]^e[s>>>16&255]^o[a>>>8&255]^u[255&h]^r[w++];s=d,a=b,h=y,v=p}var m=(f[s>>>24]<<24|f[a>>>16&255]<<16|f[h>>>8&255]<<8|f[255&v])^r[w++],j=(f[a>>>24]<<24|f[h>>>16&255]<<16|f[v>>>8&255]<<8|f[255&s])^r[w++],g=(f[h>>>24]<<24|f[v>>>16&255]<<16|f[s>>>8&255]<<8|f[255&a])^r[w++],O=(f[v>>>24]<<24|f[s>>>16&255]<<16|f[a>>>8&255]<<8|f[255&h])^r[w++];n[t]=m,n[t+1]=j,n[t+2]=g,n[t+3]=O},t.createEncryptor=function(n,r){return new t(s(s({},r=void 0===r?{}:r),{key:n,transformMode:e.t.ENC_TRANSFORM_MODE}))},t.createDecryptor=function(n,r){return new t(s(s({},r=void 0===r?{}:r),{key:n,transformMode:e.t.DEC_TRANSFORM_MODE}))},t.encrypt=function(n,r,i){if("string"==typeof r)return u.E.encrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){if("string"==typeof r)return u.E.decrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.decrypt(t,n,r,i)},t.keySize=8,t}(o.G)},6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.k=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.I=t.clone(),u=this.S=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(l<<14|l>>>18)^l>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=d+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.F=function(){var n=this.H.words,t=8*this.L,r=8*this.H.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.H.nSigBytes=4*n.length,this.R(),this.U},t.prototype.clone=function(){return new t({hash:this.U,blockSize:this.q,data:this.H,nBytes:this.L})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.J=Array.isArray(t)?t:[],void(this.V="number"==typeof r?r:4*this.J.length);if(t instanceof n)return this.J=t.words.slice(),void(this.V=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.J=o,this.V=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.V},set:function(n){this.V=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.J},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.J,t=this.V,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.V%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.J[this.V+i>>>2]|=e<<24-(this.V+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.V+=r,this},n.prototype.clamp=function(){var n=this.V;this.J[n>>>2]&=4294967295<<32-n%4*8,this.J.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.J.slice(),this.V)},n.random=function(t){for(var r=[],i=0;i>>2,f=r+o,c=f>>>2,s=n.words[c]>>>24-f%4*8&255;e[u]=0|e[u]|s<<24-o%4*8}var a=new i.e(e,t);return a.clamp(),a}},7919:function(n,t,r){r.d(t,{l:function(){return e}});var i=r(3354);var e={pad:function(n,t){for(var r=4*t,e=r-n.nSigBytes%r,o=e<<24|e<<16|e<<8|e,u=[],f=0;f>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()},3664:function(n,t,r){r.d(t,{K:function(){return c}});var i,e=r(1863),o=r(3354),u=r(4055),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(n){function t(t){var r=n.call(this,t)||this;r.an=1;var i=t.cipher,e=t.iv;if(4!==i.blockSize)throw new Error("In CCM, cipher block size must be 128bit");if(e&&(e.nSigBytes>13||e.nSigBytes<7))throw new Error("Byte size of iv must be between 7 and 13");return r.hn=e||new o.e([0,0],8),r.vn=15-r.hn.nSigBytes,r}return f(t,n),t.getB0=function(n,t,r,i){if(r.nSigBytes+i.nSigBytes!==15)throw new Error("LEN(Q)+LEN(N) must be 15");var e=255&(0|(n?1:0)<<6|(t-2)/2<<3|r.nSigBytes-1),u=i.clone().concat(r);return new o.e([e<<24],1).concat(u)},t.formatAssociatedDataAndPayload=function(n,t){var r,i=n.nSigBytes;if(0===i)r=new o.e([0],0);else if(i4?(e.concat(new o.e([0],n%4)),e.concat(new o.e([r],4))):e.concat(new o.e([r<<32-8*n],n)):e.concat(new o.e([r],4)),i.concat(t).concat(e)},t.mac=function(n,r,i,e,f,c){var s=new n({key:r,iv:i});if(4!==s.blockSize)throw new Error("In CCM, cipher block size must be 128bit");if(i&&(i.nSigBytes>13||i.nSigBytes<7))throw new Error("Byte size of iv must be between 7 and 13");var a=i||new o.e([0,0],8),h=(null==e?void 0:e.clone())||new o.e,v=h.nSigBytes,w=(null==f?void 0:f.clone())||new o.e,l=w.nSigBytes;if(l>>>0>4294967295)throw new Error("Byte length of Payload(plainText) larger than 2^32-1 (4,294,967,295byte) is not supported at this time.");var d=15-a.nSigBytes,b=(0,u.ur)(new o.e([0,l],8),d),y=c||16,p=t.getB0(Boolean(v),y,b,a),m=t.formatAssociatedDataAndPayload(h,w),j=p.words.slice();s.encryptBlock(j,0);for(var g=m.nSigBytes/16,O=m.words,E=j,_=0;_e&&(t=n.finalize(t)),t.clamp();for(var o=this.u=t.clone(),u=this.h=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=l+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.N=function(){var n=this.k.words,t=8*this.I,r=8*this.k.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.k.nSigBytes=4*n.length,this.S(),this.v},t.prototype.clone=function(){return new t({hash:this.v,blockSize:this.U,data:this.k,nBytes:this.I})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.F=Array.isArray(t)?t:[],void(this.H="number"==typeof r?r:4*this.F.length);if(t instanceof n)return this.F=t.words.slice(),void(this.H=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.F=o,this.H=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.H},set:function(n){this.H=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.F},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.F,t=this.H,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.H%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.F[this.H+i>>>2]|=e<<24-(this.H+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.H+=r,this},n.prototype.clamp=function(){var n=this.H;this.F[n>>>2]&=4294967295<<32-n%4*8,this.F.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.F.slice(),this.H)},n.random=function(t){for(var r=[],i=0;i>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"en",{value:!0})};var i={};return function(){r.r(i),r.d(i,{DES:function(){return d}});var n,t=r(787),e=r(9456),o=r(5693),u=r(9109),f=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),c=function(){return(c=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>5]>>>31-i%32&1}for(var e=this.on=[],o=0;o<16;o++){var u=e[o]=[],f=h[o];for(r=0;r<24;r++)u[r/6|0]|=t[(a[r]-1+f)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(a[r+24]-1+f)%28]<<31-r%6;u[0]=u[0]<<1|u[0]>>>31;for(r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}this.un=[];for(r=0;r<16;r++)this.un[r]=e[15-r]},t.prototype.encryptBlock=function(n,t){this.sn(n,t,this.on)},t.prototype.decryptBlock=function(n,t){this.sn(n,t,this.un)},t.prototype.sn=function(n,t,r){this.fn=n[t],this.cn=n[t+1],this.an(4,252645135),this.an(16,65535),this.hn(2,858993459),this.hn(8,16711935),this.an(1,1431655765);for(var i=0;i<16;i++){for(var e=r[i],o=this.fn,u=this.cn,f=0,c=0;c<8;c++){var s=(u^e[c])&w[c];f|=v[c][s>>>0]}this.fn=u,this.cn=o^f}var a=this.fn;this.fn=this.cn,this.cn=a,this.an(1,1431655765),this.hn(8,16711935),this.hn(2,858993459),this.an(16,65535),this.an(4,252645135),n[t]=this.fn,n[t+1]=this.cn},t.prototype.an=function(n,t){var r=(this.fn>>>n^this.cn)&t;this.cn^=r,this.fn^=r<>>n^this.fn)&t;this.fn^=r,this.cn^=r<e&&(t=n.finalize(t)),t.clamp();for(var o=this.u=t.clone(),u=this.h=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=l+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.N=function(){var n=this.k.words,t=8*this.I,r=8*this.k.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.k.nSigBytes=4*n.length,this.S(),this.v},t.prototype.clone=function(){return new t({hash:this.v,blockSize:this.U,data:this.k,nBytes:this.I})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.F=Array.isArray(t)?t:[],void(this.H="number"==typeof r?r:4*this.F.length);if(t instanceof n)return this.F=t.words.slice(),void(this.H=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.F=o,this.H=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.H},set:function(n){this.H=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.F},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.F,t=this.H,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.H%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.F[this.H+i>>>2]|=e<<24-(this.H+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.H+=r,this},n.prototype.clamp=function(){var n=this.H;this.F[n>>>2]&=4294967295<<32-n%4*8,this.F.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.F.slice(),this.H)},n.random=function(t){for(var r=[],i=0;i>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"en",{value:!0})};var i={};return function(){r.r(i),r.d(i,{DES:function(){return d}});var n,t=r(787),e=r(9456),o=r(5693),u=r(9109),f=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),c=function(){return(c=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>5]>>>31-i%32&1}for(var e=this.on=[],o=0;o<16;o++){var u=e[o]=[],f=h[o];for(r=0;r<24;r++)u[r/6|0]|=t[(a[r]-1+f)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(a[r+24]-1+f)%28]<<31-r%6;u[0]=u[0]<<1|u[0]>>>31;for(r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}this.un=[];for(r=0;r<16;r++)this.un[r]=e[15-r]},t.prototype.encryptBlock=function(n,t){this.sn(n,t,this.on)},t.prototype.decryptBlock=function(n,t){this.sn(n,t,this.un)},t.prototype.sn=function(n,t,r){this.fn=n[t],this.cn=n[t+1],this.an(4,252645135),this.an(16,65535),this.hn(2,858993459),this.hn(8,16711935),this.an(1,1431655765);for(var i=0;i<16;i++){for(var e=r[i],o=this.fn,u=this.cn,f=0,c=0;c<8;c++){var s=(u^e[c])&w[c];f|=v[c][s>>>0]}this.fn=u,this.cn=o^f}var a=this.fn;this.fn=this.cn,this.cn=a,this.an(1,1431655765),this.hn(8,16711935),this.hn(2,858993459),this.an(16,65535),this.an(4,252645135),n[t]=this.fn,n[t+1]=this.cn},t.prototype.an=function(n,t){var r=(this.fn>>>n^this.cn)&t;this.cn^=r,this.fn^=r<>>n^this.fn)&t;this.fn^=r,this.cn^=r<>>5]>>>31-i%32&1}for(var e=this.u=[],o=0;o<16;o++){var u=e[o]=[],f=v[o];for(r=0;r<24;r++)u[r/6|0]|=t[(h[r]-1+f)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(h[r+24]-1+f)%28]<<31-r%6;u[0]=u[0]<<1|u[0]>>>31;for(r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}this.h=[];for(r=0;r<16;r++)this.h[r]=e[15-r]},t.prototype.encryptBlock=function(n,t){this.N(n,t,this.u)},t.prototype.decryptBlock=function(n,t){this.N(n,t,this.h)},t.prototype.N=function(n,t,r){this.v=n[t],this.j=n[t+1],this.S(4,252645135),this.S(16,65535),this.I(2,858993459),this.I(8,16711935),this.S(1,1431655765);for(var i=0;i<16;i++){for(var e=r[i],o=this.v,u=this.j,f=0,c=0;c<8;c++){var s=(u^e[c])&d[c];f|=w[c][s>>>0]}this.v=u,this.j=o^f}var a=this.v;this.v=this.j,this.j=a,this.S(1,1431655765),this.I(8,16711935),this.I(2,858993459),this.S(16,65535),this.S(4,252645135),n[t]=this.v,n[t+1]=this.j},t.prototype.S=function(n,t){var r=(this.v>>>n^this.j)&t;this.j^=r,this.v^=r<>>n^this.v)&t;this.v^=r,this.j^=r<e&&(t=n.finalize(t)),t.clamp();for(var o=this.F=t.clone(),u=this.H=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=l+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.R=function(){var n=this.J.words,t=8*this.K,r=8*this.J.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.J.nSigBytes=4*n.length,this.L(),this.B},t.prototype.clone=function(){return new t({hash:this.B,blockSize:this.i,data:this.J,nBytes:this.K})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.V=Array.isArray(t)?t:[],void(this.X="number"==typeof r?r:4*this.V.length);if(t instanceof n)return this.V=t.words.slice(),void(this.X=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.V=o,this.X=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.X},set:function(n){this.X=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.V},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.V,t=this.X,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.X%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.V[this.X+i>>>2]|=e<<24-(this.X+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.X+=r,this},n.prototype.clamp=function(){var n=this.X;this.V[n>>>2]&=4294967295<<32-n%4*8,this.V.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.V.slice(),this.X)},n.random=function(t){for(var r=[],i=0;i>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"hn",{value:!0})};var i={};return function(){r.r(i),r.d(i,{DES3:function(){return h}});var n,t=r(9109),e=r(787),o=r(9456),u=r(9910),f=r(3354),c=r(5693),s=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),a=function(){return(a=Object.assign||function(n){for(var t,r=1,i=arguments.length;r192.");var t=n.slice(0,2),r=n.length<4?n.slice(0,2):n.slice(2,4),i=n.length<6?n.slice(0,2):n.slice(4,6);return[u.DES.createEncryptor(new f.e(t)),u.DES.createEncryptor(new f.e(r)),u.DES.createEncryptor(new f.e(i))]},r.prototype.A=function(){var n=this.vn();this.wn=n[0],this.dn=n[1],this.ln=n[2]},r.prototype.encryptBlock=function(n,t){this.wn.encryptBlock(n,t),this.dn.decryptBlock(n,t),this.ln.encryptBlock(n,t)},r.prototype.decryptBlock=function(n,t){this.ln.decryptBlock(n,t),this.dn.encryptBlock(n,t),this.wn.decryptBlock(n,t)},r.createEncryptor=function(n,t){return new r(a(a({},t=void 0===t?{}:t),{key:n,transformMode:o.t.ENC_TRANSFORM_MODE}))},r.createDecryptor=function(n,t){return new r(a(a({},t=void 0===t?{}:t),{key:n,transformMode:o.t.DEC_TRANSFORM_MODE}))},r.encrypt=function(n,i,e){return"string"==typeof i?c.E.encrypt(r,n,i,e):t.D.encrypt(r,n,i,e)},r.decrypt=function(n,i,e){return"string"==typeof i?c.E.decrypt(r,n,i,e):t.D.decrypt(r,n,i,e)},r.keySize=6,r.ivSize=2,r}(e.G)}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={9910:function(n,t,r){r.d(t,{DES:function(){return l}});var i,e=r(787),o=r(9456),u=r(5693),f=r(9109),c=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return(s=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>5]>>>31-i%32&1}for(var e=this.u=[],o=0;o<16;o++){var u=e[o]=[],f=v[o];for(r=0;r<24;r++)u[r/6|0]|=t[(h[r]-1+f)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(h[r+24]-1+f)%28]<<31-r%6;u[0]=u[0]<<1|u[0]>>>31;for(r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}this.h=[];for(r=0;r<16;r++)this.h[r]=e[15-r]},t.prototype.encryptBlock=function(n,t){this.N(n,t,this.u)},t.prototype.decryptBlock=function(n,t){this.N(n,t,this.h)},t.prototype.N=function(n,t,r){this.v=n[t],this.j=n[t+1],this.I(4,252645135),this.I(16,65535),this.S(2,858993459),this.S(8,16711935),this.I(1,1431655765);for(var i=0;i<16;i++){for(var e=r[i],o=this.v,u=this.j,f=0,c=0;c<8;c++){var s=(u^e[c])&d[c];f|=w[c][s>>>0]}this.v=u,this.j=o^f}var a=this.v;this.v=this.j,this.j=a,this.I(1,1431655765),this.S(8,16711935),this.S(2,858993459),this.I(16,65535),this.I(4,252645135),n[t]=this.v,n[t+1]=this.j},t.prototype.I=function(n,t){var r=(this.v>>>n^this.j)&t;this.j^=r,this.v^=r<>>n^this.v)&t;this.v^=r,this.j^=r<e&&(t=n.finalize(t)),t.clamp();for(var o=this.F=t.clone(),u=this.H=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=l+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.R=function(){var n=this.J.words,t=8*this.K,r=8*this.J.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.J.nSigBytes=4*n.length,this.L(),this.B},t.prototype.clone=function(){return new t({hash:this.B,blockSize:this.i,data:this.J,nBytes:this.K})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.V=Array.isArray(t)?t:[],void(this.X="number"==typeof r?r:4*this.V.length);if(t instanceof n)return this.V=t.words.slice(),void(this.X=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.V=o,this.X=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.X},set:function(n){this.X=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.V},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.V,t=this.X,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.X%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.V[this.X+i>>>2]|=e<<24-(this.X+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.X+=r,this},n.prototype.clamp=function(){var n=this.X;this.V[n>>>2]&=4294967295<<32-n%4*8,this.V.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.V.slice(),this.X)},n.random=function(t){for(var r=[],i=0;i>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"hn",{value:!0})};var i={};return function(){r.r(i),r.d(i,{DES3:function(){return h}});var n,t=r(9109),e=r(787),o=r(9456),u=r(9910),f=r(3354),c=r(5693),s=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),a=function(){return(a=Object.assign||function(n){for(var t,r=1,i=arguments.length;r192.");var t=n.slice(0,2),r=n.length<4?n.slice(0,2):n.slice(2,4),i=n.length<6?n.slice(0,2):n.slice(4,6);return[u.DES.createEncryptor(new f.e(t)),u.DES.createEncryptor(new f.e(r)),u.DES.createEncryptor(new f.e(i))]},r.prototype.A=function(){var n=this.vn();this.wn=n[0],this.dn=n[1],this.ln=n[2]},r.prototype.encryptBlock=function(n,t){this.wn.encryptBlock(n,t),this.dn.decryptBlock(n,t),this.ln.encryptBlock(n,t)},r.prototype.decryptBlock=function(n,t){this.ln.decryptBlock(n,t),this.dn.encryptBlock(n,t),this.wn.decryptBlock(n,t)},r.createEncryptor=function(n,t){return new r(a(a({},t=void 0===t?{}:t),{key:n,transformMode:o.t.ENC_TRANSFORM_MODE}))},r.createDecryptor=function(n,t){return new r(a(a({},t=void 0===t?{}:t),{key:n,transformMode:o.t.DEC_TRANSFORM_MODE}))},r.encrypt=function(n,i,e){return"string"==typeof i?c.E.encrypt(r,n,i,e):t.D.encrypt(r,n,i,e)},r.decrypt=function(n,i,e){return"string"==typeof i?c.E.decrypt(r,n,i,e):t.D.decrypt(r,n,i,e)},r.keySize=6,r.ivSize=2,r}(e.G)}(),i}()})); \ No newline at end of file diff --git a/dist/EvpKDF.js b/dist/EvpKDF.js index ab2f156..fa5474e 100644 --- a/dist/EvpKDF.js +++ b/dist/EvpKDF.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={670:function(n,t,r){r.d(t,{MD5:function(){return v}});var i,e=r(3354),o=r(1868),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[];function c(n,t,r,i,e,o,u){var f=n+(t&r|~t&i)+e+u;return(f<>>32-o)+t}function a(n,t,r,i,e,o,u){var f=n+(t&i|r&~i)+e+u;return(f<>>32-o)+t}function s(n,t,r,i,e,o,u){var f=n+(t^r^i)+e+u;return(f<>>32-o)+t}function h(n,t,r,i,e,o,u){var f=n+(r^(t|~i))+e+u;return(f<>>32-o)+t}!function(){for(var n=0;n<64;n++)f[n]=4294967296*Math.abs(Math.sin(n+1))|0}();var v=function(n){function t(t){var r=n.call(this,t)||this;return r.t=new e.e([1732584193,4023233417,2562383102,271733878]),t&&void 0!==t.hash&&(r.t=t.hash.clone()),r}return u(t,n),t.prototype.i=function(){this.t=new e.e([1732584193,4023233417,2562383102,271733878])},t.prototype.u=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this.t.words,u=n[t],v=n[t+1],w=n[t+2],d=n[t+3],l=n[t+4],y=n[t+5],b=n[t+6],p=n[t+7],m=n[t+8],g=n[t+9],j=n[t+10],A=n[t+11],O=n[t+12],M=n[t+13],_=n[t+14],E=n[t+15],I=o[0],U=o[1],N=o[2],S=o[3];I=c(I,U,N,S,u,7,f[0]),S=c(S,I,U,N,v,12,f[1]),N=c(N,S,I,U,w,17,f[2]),U=c(U,N,S,I,d,22,f[3]),I=c(I,U,N,S,l,7,f[4]),S=c(S,I,U,N,y,12,f[5]),N=c(N,S,I,U,b,17,f[6]),U=c(U,N,S,I,p,22,f[7]),I=c(I,U,N,S,m,7,f[8]),S=c(S,I,U,N,g,12,f[9]),N=c(N,S,I,U,j,17,f[10]),U=c(U,N,S,I,A,22,f[11]),I=c(I,U,N,S,O,7,f[12]),S=c(S,I,U,N,M,12,f[13]),N=c(N,S,I,U,_,17,f[14]),I=a(I,U=c(U,N,S,I,E,22,f[15]),N,S,v,5,f[16]),S=a(S,I,U,N,b,9,f[17]),N=a(N,S,I,U,A,14,f[18]),U=a(U,N,S,I,u,20,f[19]),I=a(I,U,N,S,y,5,f[20]),S=a(S,I,U,N,j,9,f[21]),N=a(N,S,I,U,E,14,f[22]),U=a(U,N,S,I,l,20,f[23]),I=a(I,U,N,S,g,5,f[24]),S=a(S,I,U,N,_,9,f[25]),N=a(N,S,I,U,d,14,f[26]),U=a(U,N,S,I,m,20,f[27]),I=a(I,U,N,S,M,5,f[28]),S=a(S,I,U,N,w,9,f[29]),N=a(N,S,I,U,p,14,f[30]),I=s(I,U=a(U,N,S,I,O,20,f[31]),N,S,y,4,f[32]),S=s(S,I,U,N,m,11,f[33]),N=s(N,S,I,U,A,16,f[34]),U=s(U,N,S,I,_,23,f[35]),I=s(I,U,N,S,v,4,f[36]),S=s(S,I,U,N,l,11,f[37]),N=s(N,S,I,U,p,16,f[38]),U=s(U,N,S,I,j,23,f[39]),I=s(I,U,N,S,M,4,f[40]),S=s(S,I,U,N,u,11,f[41]),N=s(N,S,I,U,d,16,f[42]),U=s(U,N,S,I,b,23,f[43]),I=s(I,U,N,S,g,4,f[44]),S=s(S,I,U,N,O,11,f[45]),N=s(N,S,I,U,E,16,f[46]),I=h(I,U=s(U,N,S,I,w,23,f[47]),N,S,u,6,f[48]),S=h(S,I,U,N,p,10,f[49]),N=h(N,S,I,U,_,15,f[50]),U=h(U,N,S,I,y,21,f[51]),I=h(I,U,N,S,O,6,f[52]),S=h(S,I,U,N,d,10,f[53]),N=h(N,S,I,U,j,15,f[54]),U=h(U,N,S,I,v,21,f[55]),I=h(I,U,N,S,m,6,f[56]),S=h(S,I,U,N,E,10,f[57]),N=h(N,S,I,U,b,15,f[58]),U=h(U,N,S,I,M,21,f[59]),I=h(I,U,N,S,l,6,f[60]),S=h(S,I,U,N,A,10,f[61]),N=h(N,S,I,U,w,15,f[62]),U=h(U,N,S,I,g,21,f[63]),o[0]=o[0]+I|0,o[1]=o[1]+U|0,o[2]=o[2]+N|0,o[3]=o[3]+S|0},t.prototype.h=function(){var n=this.v,t=n.words,r=8*this.l,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32;var e=Math.floor(r/4294967296),o=r;t[15+(i+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n.nSigBytes=4*(t.length+1),this.j();for(var u=this.t,f=u.words,c=0;c<4;c++){var a=f[c];f[c]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return u},t.prototype.clone=function(){return new t({hash:this.t,blockSize:this.A,data:this.v,nBytes:this.l})},t.hash=function(n){return(new t).finalize(n)},t}(o.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.O=Array.isArray(t)?t:[],void(this._="number"==typeof r?r:4*this.O.length);if(t instanceof n)return this.O=t.words.slice(),void(this._=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.O=o,this._=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this._},set:function(n){this._=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.O},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.O,t=this._,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this._%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.O[this._+i>>>2]|=e<<24-(this._+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this._+=r,this},n.prototype.clamp=function(){var n=this._;this.O[n>>>2]&=4294967295<<32-n%4*8,this.O.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.O.slice(),this._)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"S",{value:!0})};var i={};return function(){r.r(i),r.d(i,{EvpKDF:function(){return f}});var n,t=r(670),e=r(3354),o=function(){function n(n){this.U=n}return n.prototype.compute=function(n,t){throw new Error("Not implemented")},n.getKey=function(n,t,r){throw new Error("Not implemented")},n}(),u=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),f=function(n){function r(r){var i=n.call(this,r)||this;return i.F=4,i.k=t.MD5,i.B=1,r&&(i.F=void 0!==r.keySize?r.keySize:i.F,i.k=void 0!==r.Hasher?r.Hasher:i.k,i.B=void 0!==r.iterations?r.iterations:i.B),i}return u(r,n),r.prototype.compute=function(n,t){for(var r,i=new this.k,o=new e.e,u=o.words,f=this.F,c=this.B;u.length>>32-o)+t}function a(n,t,r,i,e,o,u){var f=n+(t&i|r&~i)+e+u;return(f<>>32-o)+t}function s(n,t,r,i,e,o,u){var f=n+(t^r^i)+e+u;return(f<>>32-o)+t}function h(n,t,r,i,e,o,u){var f=n+(r^(t|~i))+e+u;return(f<>>32-o)+t}!function(){for(var n=0;n<64;n++)f[n]=4294967296*Math.abs(Math.sin(n+1))|0}();var v=function(n){function t(t){var r=n.call(this,t)||this;return r.t=new e.e([1732584193,4023233417,2562383102,271733878]),t&&void 0!==t.hash&&(r.t=t.hash.clone()),r}return u(t,n),t.prototype.i=function(){this.t=new e.e([1732584193,4023233417,2562383102,271733878])},t.prototype.u=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this.t.words,u=n[t],v=n[t+1],w=n[t+2],d=n[t+3],l=n[t+4],y=n[t+5],b=n[t+6],p=n[t+7],m=n[t+8],g=n[t+9],j=n[t+10],A=n[t+11],O=n[t+12],E=n[t+13],M=n[t+14],_=n[t+15],I=o[0],U=o[1],N=o[2],S=o[3];I=c(I,U,N,S,u,7,f[0]),S=c(S,I,U,N,v,12,f[1]),N=c(N,S,I,U,w,17,f[2]),U=c(U,N,S,I,d,22,f[3]),I=c(I,U,N,S,l,7,f[4]),S=c(S,I,U,N,y,12,f[5]),N=c(N,S,I,U,b,17,f[6]),U=c(U,N,S,I,p,22,f[7]),I=c(I,U,N,S,m,7,f[8]),S=c(S,I,U,N,g,12,f[9]),N=c(N,S,I,U,j,17,f[10]),U=c(U,N,S,I,A,22,f[11]),I=c(I,U,N,S,O,7,f[12]),S=c(S,I,U,N,E,12,f[13]),N=c(N,S,I,U,M,17,f[14]),I=a(I,U=c(U,N,S,I,_,22,f[15]),N,S,v,5,f[16]),S=a(S,I,U,N,b,9,f[17]),N=a(N,S,I,U,A,14,f[18]),U=a(U,N,S,I,u,20,f[19]),I=a(I,U,N,S,y,5,f[20]),S=a(S,I,U,N,j,9,f[21]),N=a(N,S,I,U,_,14,f[22]),U=a(U,N,S,I,l,20,f[23]),I=a(I,U,N,S,g,5,f[24]),S=a(S,I,U,N,M,9,f[25]),N=a(N,S,I,U,d,14,f[26]),U=a(U,N,S,I,m,20,f[27]),I=a(I,U,N,S,E,5,f[28]),S=a(S,I,U,N,w,9,f[29]),N=a(N,S,I,U,p,14,f[30]),I=s(I,U=a(U,N,S,I,O,20,f[31]),N,S,y,4,f[32]),S=s(S,I,U,N,m,11,f[33]),N=s(N,S,I,U,A,16,f[34]),U=s(U,N,S,I,M,23,f[35]),I=s(I,U,N,S,v,4,f[36]),S=s(S,I,U,N,l,11,f[37]),N=s(N,S,I,U,p,16,f[38]),U=s(U,N,S,I,j,23,f[39]),I=s(I,U,N,S,E,4,f[40]),S=s(S,I,U,N,u,11,f[41]),N=s(N,S,I,U,d,16,f[42]),U=s(U,N,S,I,b,23,f[43]),I=s(I,U,N,S,g,4,f[44]),S=s(S,I,U,N,O,11,f[45]),N=s(N,S,I,U,_,16,f[46]),I=h(I,U=s(U,N,S,I,w,23,f[47]),N,S,u,6,f[48]),S=h(S,I,U,N,p,10,f[49]),N=h(N,S,I,U,M,15,f[50]),U=h(U,N,S,I,y,21,f[51]),I=h(I,U,N,S,O,6,f[52]),S=h(S,I,U,N,d,10,f[53]),N=h(N,S,I,U,j,15,f[54]),U=h(U,N,S,I,v,21,f[55]),I=h(I,U,N,S,m,6,f[56]),S=h(S,I,U,N,_,10,f[57]),N=h(N,S,I,U,b,15,f[58]),U=h(U,N,S,I,E,21,f[59]),I=h(I,U,N,S,l,6,f[60]),S=h(S,I,U,N,A,10,f[61]),N=h(N,S,I,U,w,15,f[62]),U=h(U,N,S,I,g,21,f[63]),o[0]=o[0]+I|0,o[1]=o[1]+U|0,o[2]=o[2]+N|0,o[3]=o[3]+S|0},t.prototype.h=function(){var n=this.v,t=n.words,r=8*this.l,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32;var e=Math.floor(r/4294967296),o=r;t[15+(i+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n.nSigBytes=4*(t.length+1),this.j();for(var u=this.t,f=u.words,c=0;c<4;c++){var a=f[c];f[c]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return u},t.prototype.clone=function(){return new t({hash:this.t,blockSize:this.A,data:this.v,nBytes:this.l})},t.hash=function(n){return(new t).finalize(n)},t}(o.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.O=Array.isArray(t)?t:[],void(this._="number"==typeof r?r:4*this.O.length);if(t instanceof n)return this.O=t.words.slice(),void(this._=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.O=o,this._=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this._},set:function(n){this._=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.O},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.O,t=this._,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this._%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.O[this._+i>>>2]|=e<<24-(this._+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this._+=r,this},n.prototype.clamp=function(){var n=this._;this.O[n>>>2]&=4294967295<<32-n%4*8,this.O.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.O.slice(),this._)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"S",{value:!0})};var i={};return function(){r.r(i),r.d(i,{EvpKDF:function(){return f}});var n,t=r(670),e=r(3354),o=function(){function n(n){this.U=n}return n.prototype.compute=function(n,t){throw new Error("Not implemented")},n.getKey=function(n,t,r){throw new Error("Not implemented")},n}(),u=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),f=function(n){function r(r){var i=n.call(this,r)||this;return i.F=4,i.k=t.MD5,i.B=1,r&&(i.F=void 0!==r.keySize?r.keySize:i.F,i.k=void 0!==r.Hasher?r.Hasher:i.k,i.B=void 0!==r.iterations?r.iterations:i.B),i}return u(r,n),r.prototype.compute=function(n,t){for(var r,i=new this.k,o=new e.e,u=o.words,f=this.F,c=this.B;u.length>>8^255&e^99,s[r]=e,h[e]=r;var o=n[r],u=n[o],f=n[u],c=257*n[e]^16843008*e;v[r]=c<<24|c>>>8,w[r]=c<<16|c>>>16,l[r]=c<<8|c>>>24,d[r]=c,c=16843009*f^65537*u^257*o^16843008*r,b[e]=c<<24|c>>>8,y[e]=c<<16|c>>>16,p[e]=c<<8|c>>>24,m[e]=c,r?(r=o^n[n[n[f^o]]],i^=n[n[i]]):r=i=1}}();var j=[0,1,2,4,8,16,32,64,128,27,54],O=function(n){function t(t){var r=n.call(this,t)||this;return r.i=0,r.u=[],r.h=[],r.v=t,r.j(),r}return c(t,n),t.prototype.j=function(){var n;if(!this.i||this.O!==this.A){for(var t=this.O=this.A,r=t.words,i=t.nSigBytes/4,e=4*((this.i=i+6)+1),o=this.u=[],u=0;u6&&u%i==4&&(n=s[n>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[255&n]):(n=s[(n=n<<8|n>>>24)>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[255&n],n^=j[u/i|0]<<24),o[u]=o[u-i]^n);this.h=[];for(var f=0;f>>24]]^y[s[n>>>16&255]]^p[s[n>>>8&255]]^m[s[255&n]]}}},t.prototype.encryptBlock=function(n,t){this.k(n,t,this.u,v,w,l,d,s)},t.prototype.decryptBlock=function(n,t){var r=n[t+1];n[t+1]=n[t+3],n[t+3]=r,this.k(n,t,this.h,b,y,p,m,h),r=n[t+1],n[t+1]=n[t+3],n[t+3]=r},t.prototype.k=function(n,t,r,i,e,o,u,f){for(var c=this.i,a=n[t]^r[0],s=n[t+1]^r[1],h=n[t+2]^r[2],v=n[t+3]^r[3],w=4,l=1;l>>24]^e[s>>>16&255]^o[h>>>8&255]^u[255&v]^r[w++],b=i[s>>>24]^e[h>>>16&255]^o[v>>>8&255]^u[255&a]^r[w++],y=i[h>>>24]^e[v>>>16&255]^o[a>>>8&255]^u[255&s]^r[w++],p=i[v>>>24]^e[a>>>16&255]^o[s>>>8&255]^u[255&h]^r[w++];a=d,s=b,h=y,v=p}var m=(f[a>>>24]<<24|f[s>>>16&255]<<16|f[h>>>8&255]<<8|f[255&v])^r[w++],j=(f[s>>>24]<<24|f[h>>>16&255]<<16|f[v>>>8&255]<<8|f[255&a])^r[w++],O=(f[h>>>24]<<24|f[v>>>16&255]<<16|f[a>>>8&255]<<8|f[255&s])^r[w++],g=(f[v>>>24]<<24|f[a>>>16&255]<<16|f[s>>>8&255]<<8|f[255&h])^r[w++];n[t]=m,n[t+1]=j,n[t+2]=O,n[t+3]=g},t.createEncryptor=function(n,r){return new t(a(a({},r=void 0===r?{}:r),{key:n,transformMode:e.t.ENC_TRANSFORM_MODE}))},t.createDecryptor=function(n,r){return new t(a(a({},r=void 0===r?{}:r),{key:n,transformMode:e.t.DEC_TRANSFORM_MODE}))},t.encrypt=function(n,r,i){if("string"==typeof r)return u.E.encrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){if("string"==typeof r)return u.E.decrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.decrypt(t,n,r,i)},t.keySize=8,t}(o.G)},6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.N=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.I=t.clone(),u=this.S=t.clone(),f=o.words,c=u.words,a=0;a>>7)^(l<<14|l>>>18)^l>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=d+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&a^~f&s)+c[w]+h[w];v=s,s=a,a=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+a|0,r[6]=r[6]+s|0,r[7]=r[7]+v|0},t.prototype.B=function(){var n=this.F.words,t=8*this.K,r=8*this.F.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.F.nSigBytes=4*n.length,this.L(),this.U},t.prototype.clone=function(){return new t({hash:this.U,blockSize:this.R,data:this.F,nBytes:this.K})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.q=Array.isArray(t)?t:[],void(this.X="number"==typeof r?r:4*this.q.length);if(t instanceof n)return this.q=t.words.slice(),void(this.X=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.q=o,this.X=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.X},set:function(n){this.X=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.q},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.q,t=this.X,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.X%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.q[this.X+i>>>2]|=e<<24-(this.X+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.X+=r,this},n.prototype.clamp=function(){var n=this.X;this.q[n>>>2]&=4294967295<<32-n%4*8,this.q.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.q.slice(),this.X)},n.random=function(t){for(var r=[],i=0;i0&&e.push(0),n.concat(new i.e(e,r))}}function o(n,t){return new i.e(n.words.slice(),t)}},7919:function(n,t,r){r.d(t,{l:function(){return e}});var i=r(3354);var e={pad:function(n,t){for(var r=4*t,e=r-n.nSigBytes%r,o=e<<24|e<<16|e<<8|e,u=[],f=0;f>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,a=0;a>>6-a%4*2;f[c>>>2]|=s<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()},5607:function(n,t,r){r.d(t,{V:function(){return c}});var i,e=r(1863),o=r(3354),u=r(4055),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(n){function t(r){var i=n.call(this,r)||this;if(i.sn=[],i.hn=[],i.vn=[],4!==r.cipher.blockSize)throw new Error("In GCM block cipher mode, cipher block size must be 128bit");var e=r.cipher,o=r.iv,u=[0,0,0,0];return e.encryptBlock(u,0),i.sn=u,i.hn=t.getJ0(u,null==o?void 0:o.words),i.vn=i.hn.slice(),i}return f(t,n),t.getJ0=function(n,r){var i;if(r&&0!==r.length)if(3===r.length)i=[r[0],r[1],r[2],1];else{for(var e=r.length%4>0?4-r.length%4:0,o=r.slice(),u=0;u>>0,i=r+1>>>0>>0,o=e+1>>>0>>5]>>>31-o%32&1)>0&&(i[0]=i[0]^e[0],i[1]=i[1]^e[1],i[2]=i[2]^e[2],i[3]=i[3]^e[3]);var u=(1&e[3])>>>0,f=(1&e[0])>>>0,c=(1&e[1])>>>0,a=(1&e[2])>>>0;e[0]=e[0]>>>1,e[1]=e[1]>>>1|(f?2147483648:0),e[2]=e[2]>>>1|(c?2147483648:0),e[3]=e[3]>>>1|(a?2147483648:0),u>0&&(e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3])}return i},t.GHASH=function(n,r){if(n.length%4!=0)throw new Error("Length of 32bit word array 'H' must be multiple of 4(128bit)");if(r.length%4!=0)throw new Error("Length of 32bit word array 'X' must be multiple of 4(128bit)");for(var i=r.length,e=[0,0,0,0],o=0;o0){var _=e[4*c+m]<<32-8*g^f[c][m];y.push(_),p+=g}var A=new o.e(y,p);s.concat(A)}}return s.nSigBytes=i.nSigBytes,s.clamp(),s},t.mac=function(n,r,i,e,f,c){var a=new n({key:r,iv:i}),s=[0,0,0,0];a.encryptBlock(s,0);var h=t.getJ0(s,i.words),v=(null==e?void 0:e.clone())||new o.e,w=[0,8*v.nSigBytes],l=(null==f?void 0:f.clone())||new o.e,d=[0,8*l.nSigBytes],b=c||16;(0,u.I4)(v),(0,u.I4)(l);var y=v.words.concat(l.words).concat(w).concat(d),p=t.GHASH(s,y),m=t.GCTR(a,h,new o.e(p));return(0,u.z6)(m,b)},t.createEncryptor=function(n){return new t.Encryptor(n)},t.createDecryptor=function(n){return new t.Decryptor(n)},t.Encryptor=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return f(r,n),r.prototype.processBlock=function(n,r){var i=this.cn.blockSize;this.vn=t.inc32(this.vn);for(var e=new o.e(n.slice(r,r+i)),u=t.GCTR(this.cn,this.vn,e),f=0;f>>8^255&e^99,s[r]=e,h[e]=r;var o=n[r],u=n[o],f=n[u],c=257*n[e]^16843008*e;v[r]=c<<24|c>>>8,w[r]=c<<16|c>>>16,l[r]=c<<8|c>>>24,d[r]=c,c=16843009*f^65537*u^257*o^16843008*r,b[e]=c<<24|c>>>8,y[e]=c<<16|c>>>16,p[e]=c<<8|c>>>24,m[e]=c,r?(r=o^n[n[n[f^o]]],i^=n[n[i]]):r=i=1}}();var j=[0,1,2,4,8,16,32,64,128,27,54],O=function(n){function t(t){var r=n.call(this,t)||this;return r.i=0,r.u=[],r.h=[],r.v=t,r.j(),r}return c(t,n),t.prototype.j=function(){var n;if(!this.i||this.O!==this.A){for(var t=this.O=this.A,r=t.words,i=t.nSigBytes/4,e=4*((this.i=i+6)+1),o=this.u=[],u=0;u6&&u%i==4&&(n=s[n>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[255&n]):(n=s[(n=n<<8|n>>>24)>>>24]<<24|s[n>>>16&255]<<16|s[n>>>8&255]<<8|s[255&n],n^=j[u/i|0]<<24),o[u]=o[u-i]^n);this.h=[];for(var f=0;f>>24]]^y[s[n>>>16&255]]^p[s[n>>>8&255]]^m[s[255&n]]}}},t.prototype.encryptBlock=function(n,t){this.k(n,t,this.u,v,w,l,d,s)},t.prototype.decryptBlock=function(n,t){var r=n[t+1];n[t+1]=n[t+3],n[t+3]=r,this.k(n,t,this.h,b,y,p,m,h),r=n[t+1],n[t+1]=n[t+3],n[t+3]=r},t.prototype.k=function(n,t,r,i,e,o,u,f){for(var c=this.i,a=n[t]^r[0],s=n[t+1]^r[1],h=n[t+2]^r[2],v=n[t+3]^r[3],w=4,l=1;l>>24]^e[s>>>16&255]^o[h>>>8&255]^u[255&v]^r[w++],b=i[s>>>24]^e[h>>>16&255]^o[v>>>8&255]^u[255&a]^r[w++],y=i[h>>>24]^e[v>>>16&255]^o[a>>>8&255]^u[255&s]^r[w++],p=i[v>>>24]^e[a>>>16&255]^o[s>>>8&255]^u[255&h]^r[w++];a=d,s=b,h=y,v=p}var m=(f[a>>>24]<<24|f[s>>>16&255]<<16|f[h>>>8&255]<<8|f[255&v])^r[w++],j=(f[s>>>24]<<24|f[h>>>16&255]<<16|f[v>>>8&255]<<8|f[255&a])^r[w++],O=(f[h>>>24]<<24|f[v>>>16&255]<<16|f[a>>>8&255]<<8|f[255&s])^r[w++],g=(f[v>>>24]<<24|f[a>>>16&255]<<16|f[s>>>8&255]<<8|f[255&h])^r[w++];n[t]=m,n[t+1]=j,n[t+2]=O,n[t+3]=g},t.createEncryptor=function(n,r){return new t(a(a({},r=void 0===r?{}:r),{key:n,transformMode:e.t.ENC_TRANSFORM_MODE}))},t.createDecryptor=function(n,r){return new t(a(a({},r=void 0===r?{}:r),{key:n,transformMode:e.t.DEC_TRANSFORM_MODE}))},t.encrypt=function(n,r,i){if("string"==typeof r)return u.E.encrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){if("string"==typeof r)return u.E.decrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.decrypt(t,n,r,i)},t.keySize=8,t}(o.G)},6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.I=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.N=t.clone(),u=this.S=t.clone(),f=o.words,c=u.words,a=0;a>>7)^(l<<14|l>>>18)^l>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=d+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&a^~f&s)+c[w]+h[w];v=s,s=a,a=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+a|0,r[6]=r[6]+s|0,r[7]=r[7]+v|0},t.prototype.F=function(){var n=this.B.words,t=8*this.K,r=8*this.B.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.B.nSigBytes=4*n.length,this.L(),this.U},t.prototype.clone=function(){return new t({hash:this.U,blockSize:this.R,data:this.B,nBytes:this.K})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.q=Array.isArray(t)?t:[],void(this.X="number"==typeof r?r:4*this.q.length);if(t instanceof n)return this.q=t.words.slice(),void(this.X=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.q=o,this.X=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.X},set:function(n){this.X=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.q},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.q,t=this.X,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.X%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.q[this.X+i>>>2]|=e<<24-(this.X+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.X+=r,this},n.prototype.clamp=function(){var n=this.X;this.q[n>>>2]&=4294967295<<32-n%4*8,this.q.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.q.slice(),this.X)},n.random=function(t){for(var r=[],i=0;i0&&e.push(0),n.concat(new i.e(e,r))}}function o(n,t){return new i.e(n.words.slice(),t)}},7919:function(n,t,r){r.d(t,{l:function(){return e}});var i=r(3354);var e={pad:function(n,t){for(var r=4*t,e=r-n.nSigBytes%r,o=e<<24|e<<16|e<<8|e,u=[],f=0;f>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,a=0;a>>6-a%4*2;f[c>>>2]|=s<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()},5607:function(n,t,r){r.d(t,{V:function(){return c}});var i,e=r(1863),o=r(3354),u=r(4055),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(n){function t(r){var i=n.call(this,r)||this;if(i.sn=[],i.hn=[],i.vn=[],4!==r.cipher.blockSize)throw new Error("In GCM block cipher mode, cipher block size must be 128bit");var e=r.cipher,o=r.iv,u=[0,0,0,0];return e.encryptBlock(u,0),i.sn=u,i.hn=t.getJ0(u,null==o?void 0:o.words),i.vn=i.hn.slice(),i}return f(t,n),t.getJ0=function(n,r){var i;if(r&&0!==r.length)if(3===r.length)i=[r[0],r[1],r[2],1];else{for(var e=r.length%4>0?4-r.length%4:0,o=r.slice(),u=0;u>>0,i=r+1>>>0>>0,o=e+1>>>0>>5]>>>31-o%32&1)>0&&(i[0]=i[0]^e[0],i[1]=i[1]^e[1],i[2]=i[2]^e[2],i[3]=i[3]^e[3]);var u=(1&e[3])>>>0,f=(1&e[0])>>>0,c=(1&e[1])>>>0,a=(1&e[2])>>>0;e[0]=e[0]>>>1,e[1]=e[1]>>>1|(f?2147483648:0),e[2]=e[2]>>>1|(c?2147483648:0),e[3]=e[3]>>>1|(a?2147483648:0),u>0&&(e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3])}return i},t.GHASH=function(n,r){if(n.length%4!=0)throw new Error("Length of 32bit word array 'H' must be multiple of 4(128bit)");if(r.length%4!=0)throw new Error("Length of 32bit word array 'X' must be multiple of 4(128bit)");for(var i=r.length,e=[0,0,0,0],o=0;o0){var _=e[4*c+m]<<32-8*g^f[c][m];y.push(_),p+=g}var A=new o.e(y,p);s.concat(A)}}return s.nSigBytes=i.nSigBytes,s.clamp(),s},t.mac=function(n,r,i,e,f,c){var a=new n({key:r,iv:i}),s=[0,0,0,0];a.encryptBlock(s,0);var h=t.getJ0(s,i.words),v=(null==e?void 0:e.clone())||new o.e,w=[0,8*v.nSigBytes],l=(null==f?void 0:f.clone())||new o.e,d=[0,8*l.nSigBytes],b=c||16;(0,u.I4)(v),(0,u.I4)(l);var y=v.words.concat(l.words).concat(w).concat(d),p=t.GHASH(s,y),m=t.GCTR(a,h,new o.e(p));return(0,u.z6)(m,b)},t.createEncryptor=function(n){return new t.Encryptor(n)},t.createDecryptor=function(n){return new t.Decryptor(n)},t.Encryptor=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return f(r,n),r.prototype.processBlock=function(n,r){var i=this.cn.blockSize;this.vn=t.inc32(this.vn);for(var e=new o.e(n.slice(r,r+i)),u=t.GCTR(this.cn,this.vn,e),f=0;f"===n?i>r:">="===n?i>=r:i===r))}("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return r.getRandomValues(new Uint32Array(1))[0]}}return void 0!==n.g&&n.g.crypto?function(){return n.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}(),a=function(){function n(r,t){if(Array.isArray(r)||!r)return this.i=Array.isArray(r)?r:[],void(this.u="number"==typeof t?t:4*this.i.length);if(r instanceof n)return this.i=r.words.slice(),void(this.u=r.nSigBytes);var e;try{r instanceof ArrayBuffer?e=new Uint8Array(r):(r instanceof Uint8Array||r instanceof Int8Array||r instanceof Uint8ClampedArray||r instanceof Int16Array||r instanceof Uint16Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Float32Array||r instanceof Float64Array)&&(e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength))}catch(n){throw new Error("Invalid argument")}if(!e)throw new Error("Invalid argument");for(var i=e.byteLength,o=[],a=0;a>>2]|=e[a]<<24-a%4*8;this.i=o,this.u=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.u},set:function(n){this.u=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.i},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):u.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.i,r=this.u,t=new Uint8Array(r),e=0;e>>2]>>>24-e%4*8&255;return t},n.prototype.concat=function(n){var r=n.words.slice(),t=n.nSigBytes;if(this.clamp(),this.u%4)for(var e=0;e>>2]>>>24-e%4*8&255;this.i[this.u+e>>>2]|=i<<24-(this.u+e)%4*8}else for(e=0;e>>2]=r[e>>>2];return this.u+=t,this},n.prototype.clamp=function(){var n=this.u;this.i[n>>>2]&=4294967295<<32-n%4*8,this.i.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.i.slice(),this.u)},n.random=function(r){for(var t=[],e=0;e>>2]>>>24-i%4*8&255;e.push((o>>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},parse:function(n){var r=n.length;if(r%2!=0)throw new Error("Hex string count must be even");for(var t=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new a(t,r/2)}};return r}()})); \ No newline at end of file +!function(n,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else if("object"==typeof exports)exports.JsCrypto=r();else{var t=r();for(var e in n.JsCrypto=n.JsCrypto||{},t)n.JsCrypto[e]=t[e]}}(this,(function(){return function(){"use strict";var n={d:function(r,t){for(var e in t)n.o(t,e)&&!n.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})}};n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),n.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},n.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"t",{value:!0})};var r={};n.r(r),n.d(r,{Hex:function(){return f}});var t,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",i=(t=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(t)?(t=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(t)&&t):t);var o=function(){if("undefined"!=typeof window){var r=window.crypto||window.msCrypto;if(!r){if(function(n,r){return!1!==i&&(!r||("<"===n?i"===n?i>r:">="===n?i>=r:i===r))}("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return r.getRandomValues(new Uint32Array(1))[0]}}return void 0!==n.g&&n.g.crypto?function(){return n.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}(),a=function(){function n(r,t){if(Array.isArray(r)||!r)return this.i=Array.isArray(r)?r:[],void(this.u="number"==typeof t?t:4*this.i.length);if(r instanceof n)return this.i=r.words.slice(),void(this.u=r.nSigBytes);var e;try{r instanceof ArrayBuffer?e=new Uint8Array(r):(r instanceof Uint8Array||r instanceof Int8Array||r instanceof Uint8ClampedArray||r instanceof Int16Array||r instanceof Uint16Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Float32Array||r instanceof Float64Array)&&(e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength))}catch(n){throw new Error("Invalid argument")}if(!e)throw new Error("Invalid argument");for(var i=e.byteLength,o=[],a=0;a>>2]|=e[a]<<24-a%4*8;this.i=o,this.u=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.u},set:function(n){this.u=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.i},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):f.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.i,r=this.u,t=new Uint8Array(r),e=0;e>>2]>>>24-e%4*8&255;return t},n.prototype.concat=function(n){var r=n.words.slice(),t=n.nSigBytes;if(this.clamp(),this.u%4)for(var e=0;e>>2]>>>24-e%4*8&255;this.i[this.u+e>>>2]|=i<<24-(this.u+e)%4*8}else for(e=0;e>>2]=r[e>>>2];return this.u+=t,this},n.prototype.clamp=function(){var n=this.u;this.i[n>>>2]&=4294967295<<32-n%4*8,this.i.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.i.slice(),this.u)},n.random=function(r){for(var t=[],e=0;e>>2]>>>24-i%4*8&255;e.push((o>>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},parse:function(n){var r=n.length;if(r%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var t=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new a(t,r/2)}};return r}()})); \ No newline at end of file diff --git a/dist/Hmac.js b/dist/Hmac.js index 2e9f957..5b6a851 100644 --- a/dist/Hmac.js +++ b/dist/Hmac.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var e in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[e]=r[e]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var e=r(5720),i=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var e;try{t instanceof ArrayBuffer?e=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!e)throw new Error("Invalid argument");for(var i=e.byteLength,o=[],u=0;u>>2]|=e[u]<<24-u%4*8;this.t=o,this.i=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):e.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),e=0;e>>2]>>>24-e%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var e=0;e>>2]>>>24-e%4*8&255;this.t[this.i+e>>>2]|=i<<24-(this.i+e)%4*8}else for(e=0;e>>2]=t[e>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],e=0;e"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return i}});var e=r(3354),i={stringify:function(n){for(var t=n.nSigBytes,r=n.words,e=[],i=0;i>>2]>>>24-i%4*8&255;e.push((o>>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new e.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return i}});var e=r(3354),i={stringify:function(n){for(var t=n.nSigBytes,r=n.words,e=[],i=0;i>>2]>>>24-i%4*8&255;e.push(String.fromCharCode(o))}return e.join("")},parse:function(n){for(var t=n.length,r=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new e.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return i}});var e=r(8702),i={stringify:function(n){try{return decodeURIComponent(escape(e.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return e.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return i}});var e=r(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,e.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(e){var i=t[e];if(void 0!==i)return i.exports;var o=t[e]={exports:{}};return n[e](o,o.exports,r),o.exports}r.d=function(n,t){for(var e in t)r.o(t,e)&&!r.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"u",{value:!0})};var e={};return function(){r.r(e),r.d(e,{Hmac:function(){return t}});var n=r(4768),t=function(){function t(t,r){this.h=t,"string"==typeof r&&(r=n.d.parse(r));var e=t.blockSize,i=4*e;r.nSigBytes>i&&(r=t.finalize(r)),r.clamp();for(var o=this.v=r.clone(),u=this.l=r.clone(),f=o.words,a=u.words,s=0;s>>2]|=e[u]<<24-u%4*8;this.t=o,this.i=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):e.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,r=this.i,t=new Uint8Array(r),e=0;e>>2]>>>24-e%4*8&255;return t},n.prototype.concat=function(n){var r=n.words.slice(),t=n.nSigBytes;if(this.clamp(),this.i%4)for(var e=0;e>>2]>>>24-e%4*8&255;this.t[this.i+e>>>2]|=i<<24-(this.i+e)%4*8}else for(e=0;e>>2]=r[e>>>2];return this.i+=t,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(r){for(var t=[],e=0;e"===n?o>r:">="===n?o>=r:o===r))}},5720:function(n,r,t){t.d(r,{p:function(){return i}});var e=t(3354),i={stringify:function(n){for(var r=n.nSigBytes,t=n.words,e=[],i=0;i>>2]>>>24-i%4*8&255;e.push((o>>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},parse:function(n){var r=n.length;if(r%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var t=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new e.e(t,r/2)}}},8702:function(n,r,t){t.d(r,{m:function(){return i}});var e=t(3354),i={stringify:function(n){for(var r=n.nSigBytes,t=n.words,e=[],i=0;i>>2]>>>24-i%4*8&255;e.push(String.fromCharCode(o))}return e.join("")},parse:function(n){for(var r=n.length,t=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new e.e(t,r)}}},4768:function(n,r,t){t.d(r,{d:function(){return i}});var e=t(8702),i={stringify:function(n){try{return decodeURIComponent(escape(e.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return e.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,r,t){t.d(r,{M:function(){return i}});var e=t(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,e.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==t.g&&t.g.crypto?function(){return t.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},r={};function t(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,t),o.exports}t.d=function(n,r){for(var e in r)t.o(r,e)&&!t.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:r[e]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),t.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"u",{value:!0})};var e={};return function(){t.r(e),t.d(e,{Hmac:function(){return r}});var n=t(4768),r=function(){function r(r,t){this.h=r,"string"==typeof t&&(t=n.d.parse(t));var e=r.blockSize,i=4*e;t.nSigBytes>i&&(t=r.finalize(t)),t.clamp();for(var o=this.v=t.clone(),u=this.l=t.clone(),f=o.words,a=u.words,s=0;se&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,a=0;a>>32-o)+t}function a(n,t,r,i,e,o,u){var f=n+(t&i|r&~i)+e+u;return(f<>>32-o)+t}function s(n,t,r,i,e,o,u){var f=n+(t^r^i)+e+u;return(f<>>32-o)+t}function h(n,t,r,i,e,o,u){var f=n+(r^(t|~i))+e+u;return(f<>>32-o)+t}!function(){for(var n=0;n<64;n++)f[n]=4294967296*Math.abs(Math.sin(n+1))|0}();var v=function(n){function t(t){var r=n.call(this,t)||this;return r.h=new e.e([1732584193,4023233417,2562383102,271733878]),t&&void 0!==t.hash&&(r.h=t.hash.clone()),r}return u(t,n),t.prototype.v=function(){this.h=new e.e([1732584193,4023233417,2562383102,271733878])},t.prototype.l=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this.h.words,u=n[t],v=n[t+1],d=n[t+2],w=n[t+3],y=n[t+4],l=n[t+5],b=n[t+6],p=n[t+7],m=n[t+8],g=n[t+9],j=n[t+10],A=n[t+11],M=n[t+12],O=n[t+13],I=n[t+14],U=n[t+15],E=o[0],_=o[1],S=o[2],N=o[3];E=c(E,_,S,N,u,7,f[0]),N=c(N,E,_,S,v,12,f[1]),S=c(S,N,E,_,d,17,f[2]),_=c(_,S,N,E,w,22,f[3]),E=c(E,_,S,N,y,7,f[4]),N=c(N,E,_,S,l,12,f[5]),S=c(S,N,E,_,b,17,f[6]),_=c(_,S,N,E,p,22,f[7]),E=c(E,_,S,N,m,7,f[8]),N=c(N,E,_,S,g,12,f[9]),S=c(S,N,E,_,j,17,f[10]),_=c(_,S,N,E,A,22,f[11]),E=c(E,_,S,N,M,7,f[12]),N=c(N,E,_,S,O,12,f[13]),S=c(S,N,E,_,I,17,f[14]),E=a(E,_=c(_,S,N,E,U,22,f[15]),S,N,v,5,f[16]),N=a(N,E,_,S,b,9,f[17]),S=a(S,N,E,_,A,14,f[18]),_=a(_,S,N,E,u,20,f[19]),E=a(E,_,S,N,l,5,f[20]),N=a(N,E,_,S,j,9,f[21]),S=a(S,N,E,_,U,14,f[22]),_=a(_,S,N,E,y,20,f[23]),E=a(E,_,S,N,g,5,f[24]),N=a(N,E,_,S,I,9,f[25]),S=a(S,N,E,_,w,14,f[26]),_=a(_,S,N,E,m,20,f[27]),E=a(E,_,S,N,O,5,f[28]),N=a(N,E,_,S,d,9,f[29]),S=a(S,N,E,_,p,14,f[30]),E=s(E,_=a(_,S,N,E,M,20,f[31]),S,N,l,4,f[32]),N=s(N,E,_,S,m,11,f[33]),S=s(S,N,E,_,A,16,f[34]),_=s(_,S,N,E,I,23,f[35]),E=s(E,_,S,N,v,4,f[36]),N=s(N,E,_,S,y,11,f[37]),S=s(S,N,E,_,p,16,f[38]),_=s(_,S,N,E,j,23,f[39]),E=s(E,_,S,N,O,4,f[40]),N=s(N,E,_,S,u,11,f[41]),S=s(S,N,E,_,w,16,f[42]),_=s(_,S,N,E,b,23,f[43]),E=s(E,_,S,N,g,4,f[44]),N=s(N,E,_,S,M,11,f[45]),S=s(S,N,E,_,U,16,f[46]),E=h(E,_=s(_,S,N,E,d,23,f[47]),S,N,u,6,f[48]),N=h(N,E,_,S,p,10,f[49]),S=h(S,N,E,_,I,15,f[50]),_=h(_,S,N,E,l,21,f[51]),E=h(E,_,S,N,M,6,f[52]),N=h(N,E,_,S,w,10,f[53]),S=h(S,N,E,_,j,15,f[54]),_=h(_,S,N,E,v,21,f[55]),E=h(E,_,S,N,m,6,f[56]),N=h(N,E,_,S,U,10,f[57]),S=h(S,N,E,_,b,15,f[58]),_=h(_,S,N,E,O,21,f[59]),E=h(E,_,S,N,y,6,f[60]),N=h(N,E,_,S,A,10,f[61]),S=h(S,N,E,_,d,15,f[62]),_=h(_,S,N,E,g,21,f[63]),o[0]=o[0]+E|0,o[1]=o[1]+_|0,o[2]=o[2]+S|0,o[3]=o[3]+N|0},t.prototype.j=function(){var n=this.A,t=n.words,r=8*this.O,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32;var e=Math.floor(r/4294967296),o=r;t[15+(i+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n.nSigBytes=4*(t.length+1),this.I();for(var u=this.h,f=u.words,c=0;c<4;c++){var a=f[c];f[c]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return u},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.U,data:this.A,nBytes:this.O})},t.hash=function(n){return(new t).finalize(n)},t}(o.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.S="number"==typeof r?r:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.S=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this._=o,this.S=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.S},set:function(n){this.S=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.S,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.S%4)for(var i=0;i>>2]>>>24-i%4*8&255;this._[this.S+i>>>2]|=e<<24-(this.S+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.S+=r,this},n.prototype.clamp=function(){var n=this.S;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.S)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"B",{value:!0})};var i={};return function(){r.r(i),r.d(i,{HmacMD5:function(){return e}});var n=r(6367),t=r(670);function e(r,i){return new n.Hmac(new t.MD5,i).finalize(r)}}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,a=0;a>>32-o)+t}function a(n,t,r,i,e,o,u){var f=n+(t&i|r&~i)+e+u;return(f<>>32-o)+t}function s(n,t,r,i,e,o,u){var f=n+(t^r^i)+e+u;return(f<>>32-o)+t}function h(n,t,r,i,e,o,u){var f=n+(r^(t|~i))+e+u;return(f<>>32-o)+t}!function(){for(var n=0;n<64;n++)f[n]=4294967296*Math.abs(Math.sin(n+1))|0}();var v=function(n){function t(t){var r=n.call(this,t)||this;return r.h=new e.e([1732584193,4023233417,2562383102,271733878]),t&&void 0!==t.hash&&(r.h=t.hash.clone()),r}return u(t,n),t.prototype.v=function(){this.h=new e.e([1732584193,4023233417,2562383102,271733878])},t.prototype.l=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this.h.words,u=n[t],v=n[t+1],w=n[t+2],d=n[t+3],l=n[t+4],y=n[t+5],b=n[t+6],p=n[t+7],m=n[t+8],g=n[t+9],j=n[t+10],A=n[t+11],M=n[t+12],O=n[t+13],I=n[t+14],E=n[t+15],U=o[0],_=o[1],S=o[2],N=o[3];U=c(U,_,S,N,u,7,f[0]),N=c(N,U,_,S,v,12,f[1]),S=c(S,N,U,_,w,17,f[2]),_=c(_,S,N,U,d,22,f[3]),U=c(U,_,S,N,l,7,f[4]),N=c(N,U,_,S,y,12,f[5]),S=c(S,N,U,_,b,17,f[6]),_=c(_,S,N,U,p,22,f[7]),U=c(U,_,S,N,m,7,f[8]),N=c(N,U,_,S,g,12,f[9]),S=c(S,N,U,_,j,17,f[10]),_=c(_,S,N,U,A,22,f[11]),U=c(U,_,S,N,M,7,f[12]),N=c(N,U,_,S,O,12,f[13]),S=c(S,N,U,_,I,17,f[14]),U=a(U,_=c(_,S,N,U,E,22,f[15]),S,N,v,5,f[16]),N=a(N,U,_,S,b,9,f[17]),S=a(S,N,U,_,A,14,f[18]),_=a(_,S,N,U,u,20,f[19]),U=a(U,_,S,N,y,5,f[20]),N=a(N,U,_,S,j,9,f[21]),S=a(S,N,U,_,E,14,f[22]),_=a(_,S,N,U,l,20,f[23]),U=a(U,_,S,N,g,5,f[24]),N=a(N,U,_,S,I,9,f[25]),S=a(S,N,U,_,d,14,f[26]),_=a(_,S,N,U,m,20,f[27]),U=a(U,_,S,N,O,5,f[28]),N=a(N,U,_,S,w,9,f[29]),S=a(S,N,U,_,p,14,f[30]),U=s(U,_=a(_,S,N,U,M,20,f[31]),S,N,y,4,f[32]),N=s(N,U,_,S,m,11,f[33]),S=s(S,N,U,_,A,16,f[34]),_=s(_,S,N,U,I,23,f[35]),U=s(U,_,S,N,v,4,f[36]),N=s(N,U,_,S,l,11,f[37]),S=s(S,N,U,_,p,16,f[38]),_=s(_,S,N,U,j,23,f[39]),U=s(U,_,S,N,O,4,f[40]),N=s(N,U,_,S,u,11,f[41]),S=s(S,N,U,_,d,16,f[42]),_=s(_,S,N,U,b,23,f[43]),U=s(U,_,S,N,g,4,f[44]),N=s(N,U,_,S,M,11,f[45]),S=s(S,N,U,_,E,16,f[46]),U=h(U,_=s(_,S,N,U,w,23,f[47]),S,N,u,6,f[48]),N=h(N,U,_,S,p,10,f[49]),S=h(S,N,U,_,I,15,f[50]),_=h(_,S,N,U,y,21,f[51]),U=h(U,_,S,N,M,6,f[52]),N=h(N,U,_,S,d,10,f[53]),S=h(S,N,U,_,j,15,f[54]),_=h(_,S,N,U,v,21,f[55]),U=h(U,_,S,N,m,6,f[56]),N=h(N,U,_,S,E,10,f[57]),S=h(S,N,U,_,b,15,f[58]),_=h(_,S,N,U,O,21,f[59]),U=h(U,_,S,N,l,6,f[60]),N=h(N,U,_,S,A,10,f[61]),S=h(S,N,U,_,w,15,f[62]),_=h(_,S,N,U,g,21,f[63]),o[0]=o[0]+U|0,o[1]=o[1]+_|0,o[2]=o[2]+S|0,o[3]=o[3]+N|0},t.prototype.j=function(){var n=this.A,t=n.words,r=8*this.O,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32;var e=Math.floor(r/4294967296),o=r;t[15+(i+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n.nSigBytes=4*(t.length+1),this.I();for(var u=this.h,f=u.words,c=0;c<4;c++){var a=f[c];f[c]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return u},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.U,data:this.A,nBytes:this.O})},t.hash=function(n){return(new t).finalize(n)},t}(o.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.S="number"==typeof r?r:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.S=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this._=o,this.S=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.S},set:function(n){this.S=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.S,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.S%4)for(var i=0;i>>2]>>>24-i%4*8&255;this._[this.S+i>>>2]|=e<<24-(this.S+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.S+=r,this},n.prototype.clamp=function(){var n=this.S;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.S)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"k",{value:!0})};var i={};return function(){r.r(i),r.d(i,{HmacMD5:function(){return e}});var n=r(6367),t=r(670);function e(r,i){return new n.Hmac(new t.MD5,i).finalize(r)}}(),i}()})); \ No newline at end of file diff --git a/dist/HmacSHA1.js b/dist/HmacSHA1.js index 084c2ba..339155f 100644 --- a/dist/HmacSHA1.js +++ b/dist/HmacSHA1.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>31}var h=(i<<5|i>>>27)+c+f[s];h+=s<20?1518500249+(e&o|~e&u):s<40?1859775393+(e^o^u):s<60?(e&o|e&u|o&u)-1894007588:(e^o^u)-899497514,c=u,u=o,o=e<<30|e>>>2,e=i,i=h}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+c|0},t.prototype.j=function(){var n=this.O.words,t=8*this.I,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.U(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.S,data:this.O,nBytes:this.I})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.N="number"==typeof r?r:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.N=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this._=o,this.N=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.N},set:function(n){this.N=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.N,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.N%4)for(var i=0;i>>2]>>>24-i%4*8&255;this._[this.N+i>>>2]|=e<<24-(this.N+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.N+=r,this},n.prototype.clamp=function(){var n=this.N;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.N)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"k",{value:!0})};var i={};return function(){r.r(i),r.d(i,{HmacSHA1:function(){return e}});var n=r(6367),t=r(3173);function e(r,i){return new n.Hmac(new t.SHA1,i).finalize(r)}}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>31}var h=(i<<5|i>>>27)+c+f[s];h+=s<20?1518500249+(e&o|~e&u):s<40?1859775393+(e^o^u):s<60?(e&o|e&u|o&u)-1894007588:(e^o^u)-899497514,c=u,u=o,o=e<<30|e>>>2,e=i,i=h}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+c|0},t.prototype.j=function(){var n=this.O.words,t=8*this.I,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.U(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.S,data:this.O,nBytes:this.I})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.N="number"==typeof r?r:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.N=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this._=o,this.N=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.N},set:function(n){this.N=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.N,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.N%4)for(var i=0;i>>2]>>>24-i%4*8&255;this._[this.N+i>>>2]|=e<<24-(this.N+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.N+=r,this},n.prototype.clamp=function(){var n=this.N;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.N)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"k",{value:!0})};var i={};return function(){r.r(i),r.d(i,{HmacSHA1:function(){return e}});var n=r(6367),t=r(3173);function e(r,i){return new n.Hmac(new t.SHA1,i).finalize(r)}}(),i}()})); \ No newline at end of file diff --git a/dist/HmacSHA224.js b/dist/HmacSHA224.js index 16638b7..987a52a 100644 --- a/dist/HmacSHA224.js +++ b/dist/HmacSHA224.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.j=function(){var n=this.O.words,t=8*this._,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.S(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.A,data:this.O,nBytes:this._})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.U=Array.isArray(t)?t:[],void(this.N="number"==typeof r?r:4*this.U.length);if(t instanceof n)return this.U=t.words.slice(),void(this.N=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.U=o,this.N=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.N},set:function(n){this.N=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.U},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.U,t=this.N,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.N%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.U[this.N+i>>>2]|=e<<24-(this.N+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.N+=r,this},n.prototype.clamp=function(){var n=this.N;this.U[n>>>2]&=4294967295<<32-n%4*8,this.U.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.U.slice(),this.N)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"B",{value:!0})};var i={};return function(){r.r(i),r.d(i,{HmacSHA224:function(){return e}});var n=r(6367),t=r(766);function e(r,i){return new n.Hmac(new t.SHA224,i).finalize(r)}}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.A=function(){var n=this.O.words,t=8*this._,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.S(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.j,data:this.O,nBytes:this._})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.U=Array.isArray(t)?t:[],void(this.H="number"==typeof r?r:4*this.U.length);if(t instanceof n)return this.U=t.words.slice(),void(this.H=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.U=o,this.H=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.H},set:function(n){this.H=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.U},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.U,t=this.H,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.H%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.U[this.H+i>>>2]|=e<<24-(this.H+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.H+=r,this},n.prototype.clamp=function(){var n=this.H;this.U[n>>>2]&=4294967295<<32-n%4*8,this.U.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.U.slice(),this.H)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"k",{value:!0})};var i={};return function(){r.r(i),r.d(i,{HmacSHA224:function(){return e}});var n=r(6367),t=r(766);function e(r,i){return new n.Hmac(new t.SHA224,i).finalize(r)}}(),i}()})); \ No newline at end of file diff --git a/dist/HmacSHA256.js b/dist/HmacSHA256.js index 0a58e01..7f3593d 100644 --- a/dist/HmacSHA256.js +++ b/dist/HmacSHA256.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(w<<14|w>>>18)^w>>>3,y=h[d-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[d]=l+h[d-7]+b+h[d-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[d]+h[d];v=a,a=s,s=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.j=function(){var n=this.O.words,t=8*this.I,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.U(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.S,data:this.O,nBytes:this.I})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.N="number"==typeof r?r:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.N=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this._=o,this.N=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.N},set:function(n){this.N=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.N,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.N%4)for(var i=0;i>>2]>>>24-i%4*8&255;this._[this.N+i>>>2]|=e<<24-(this.N+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.N+=r,this},n.prototype.clamp=function(){var n=this.N;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.N)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"k",{value:!0})};var i={};return function(){r.r(i),r.d(i,{HmacSHA256:function(){return e}});var n=r(6367),t=r(5561);function e(r,i){return new n.Hmac(new t.SHA256,i).finalize(r)}}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,a=0;a>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&a^~f&s)+c[w]+h[w];v=s,s=a,a=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+a|0,r[6]=r[6]+s|0,r[7]=r[7]+v|0},t.prototype.j=function(){var n=this.O.words,t=8*this.I,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.U(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.S,data:this.O,nBytes:this.I})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.N="number"==typeof r?r:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.N=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this._=o,this.N=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.N},set:function(n){this.N=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.N,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.N%4)for(var i=0;i>>2]>>>24-i%4*8&255;this._[this.N+i>>>2]|=e<<24-(this.N+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.N+=r,this},n.prototype.clamp=function(){var n=this.N;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.N)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"k",{value:!0})};var i={};return function(){r.r(i),r.d(i,{HmacSHA256:function(){return e}});var n=r(6367),t=r(5561);function e(r,i){return new n.Hmac(new t.SHA256,i).finalize(r)}}(),i}()})); \ No newline at end of file diff --git a/dist/HmacSHA384.js b/dist/HmacSHA384.js index 9e2afe1..4989624 100644 --- a/dist/HmacSHA384.js +++ b/dist/HmacSHA384.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var e=t();for(var r in n.JsCrypto=n.JsCrypto||{},e)n.JsCrypto[r]=e[r]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,e){e.d(t,{Hmac:function(){return i}});var r=e(4768),i=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=r.d.parse(t));var e=n.blockSize,i=4*e;t.nSigBytes>i&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>1|Y<<31)^(X>>>8|Y<<24)^X>>>7,$=(Y>>>1|X<<31)^(Y>>>8|X<<24)^(Y>>>7|X<<25),nn=c[K-2],tn=nn.high,en=nn.low,rn=(tn>>>19|en<<13)^(tn<<3|en>>>29)^tn>>>6,on=(en>>>19|tn<<13)^(en<<3|tn>>>29)^(en>>>6|tn<<26),un=c[K-7],fn=un.high,cn=un.low,sn=c[K-16],wn=sn.high,an=sn.low;Q=(Q=(Q=Z+fn+((L=$+cn)>>>0<$>>>0?1:0))+rn+((L+=on)>>>0>>0?1:0))+wn+((L+=an)>>>0>>0?1:0),V.high=Q,V.low=L}var hn=F&P^~F&q,vn=T&R^~T&D,dn=E&H^E&B^H&B,bn=N&x^N&C^x&C,ln=(E>>>28|N<<4)^(E<<30|N>>>2)^(E<<25|N>>>7),yn=(N>>>28|E<<4)^(N<<30|E>>>2)^(N<<25|E>>>7),pn=(F>>>14|T<<18)^(F>>>18|T<<14)^(F<<23|T>>>9),mn=(T>>>14|F<<18)^(T>>>18|F<<14)^(T<<23|F>>>9),gn=f[K],jn=gn.high,An=gn.low,On=J+mn,_n=G+pn+(On>>>0>>0?1:0),Sn=yn+bn;G=q,J=D,q=P,D=R,P=F,R=T,F=k+(_n=(_n=(_n=_n+hn+((On+=vn)>>>0>>0?1:0))+jn+((On+=An)>>>0>>0?1:0))+Q+((On+=L)>>>0>>0?1:0))+((T=z+On|0)>>>0>>0?1:0)|0,k=B,z=C,B=H,C=x,H=E,x=N,E=_n+(ln+dn+(Sn>>>0>>0?1:0))+((N=On+Sn|0)>>>0>>0?1:0)|0}d=r.low=d+N,r.high=v+E+(d>>>0>>0?1:0),l=i.low=l+x,i.high=b+H+(l>>>0>>0?1:0),p=o.low=p+C,o.high=y+B+(p>>>0>>0?1:0),g=u.low=g+z,u.high=m+k+(g>>>0>>0?1:0),A=s.low=A+T,s.high=j+F+(A>>>0>>0?1:0),_=w.low=_+R,w.high=O+P+(_>>>0>>0?1:0),I=a.low=I+D,a.high=S+q+(I>>>0>>0?1:0),U=h.low=U+J,h.high=M+G+(U>>>0>>0?1:0)},t.prototype.j=function(){var n=this.O,t=n.words,e=8*this._,r=8*n.nSigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(e/4294967296),t[31+(r+128>>>10<<5)]=e,n.nSigBytes=4*t.length,this.I(),this.h.to32()},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.A,data:this.O,nBytes:this._})},t.hash=function(n,e){return new t(e).finalize(n)},t}(i.P)},3354:function(n,t,e){e.d(t,{e:function(){return o}});var r=e(5720),i=e(9054),o=function(){function n(t,e){if(Array.isArray(t)||!t)return this.U=Array.isArray(t)?t:[],void(this.N="number"==typeof e?e:4*this.U.length);if(t instanceof n)return this.U=t.words.slice(),void(this.N=t.nSigBytes);var r;try{t instanceof ArrayBuffer?r=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!r)throw new Error("Invalid argument");for(var i=r.byteLength,o=[],u=0;u>>2]|=r[u]<<24-u%4*8;this.U=o,this.N=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.N},set:function(n){this.N=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.U},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):r.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.U,t=this.N,e=new Uint8Array(t),r=0;r>>2]>>>24-r%4*8&255;return e},n.prototype.concat=function(n){var t=n.words.slice(),e=n.nSigBytes;if(this.clamp(),this.N%4)for(var r=0;r>>2]>>>24-r%4*8&255;this.U[this.N+r>>>2]|=i<<24-(this.N+r)%4*8}else for(r=0;r>>2]=t[r>>>2];return this.N+=e,this},n.prototype.clamp=function(){var n=this.N;this.U[n>>>2]&=4294967295<<32-n%4*8,this.U.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.U.slice(),this.N)},n.random=function(t){for(var e=[],r=0;r"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,e){e.d(t,{p:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var e=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new r.e(e,t/2)}}},8702:function(n,t,e){e.d(t,{m:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(n){for(var t=n.length,e=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new r.e(e,t)}}},4768:function(n,t,e){e.d(t,{d:function(){return i}});var r=e(8702),i={stringify:function(n){try{return decodeURIComponent(escape(r.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return r.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,e){e.d(t,{M:function(){return i}});var r=e(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,r.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==e.g&&e.g.crypto?function(){return e.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function e(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return n[r](o,o.exports,e),o.exports}e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"k",{value:!0})};var r={};return function(){e.r(r),e.d(r,{HmacSHA384:function(){return i}});var n=e(6367),t=e(6324);function i(e,r){return new n.Hmac(new t.SHA384,r).finalize(e)}}(),r}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var e=t();for(var r in n.JsCrypto=n.JsCrypto||{},e)n.JsCrypto[r]=e[r]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,e){e.d(t,{Hmac:function(){return i}});var r=e(4768),i=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=r.d.parse(t));var e=n.blockSize,i=4*e;t.nSigBytes>i&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>1|X<<31)^(W>>>8|X<<24)^W>>>7,Z=(X>>>1|W<<31)^(X>>>8|W<<24)^(X>>>7|W<<25),nn=c[J-2],tn=nn.high,en=nn.low,rn=(tn>>>19|en<<13)^(tn<<3|en>>>29)^tn>>>6,on=(en>>>19|tn<<13)^(en<<3|tn>>>29)^(en>>>6|tn<<26),un=c[J-7],fn=un.high,cn=un.low,sn=c[J-16],wn=sn.high,an=sn.low;L=(L=(L=Y+fn+((K=Z+cn)>>>0>>0?1:0))+rn+((K+=on)>>>0>>0?1:0))+wn+((K+=an)>>>0>>0?1:0),Q.high=L,Q.low=K}var hn=z&P^~z&q,vn=T&R^~T&$,dn=U&N^U&B^N&B,ln=H&x^H&C^x&C,bn=(U>>>28|H<<4)^(U<<30|H>>>2)^(U<<25|H>>>7),yn=(H>>>28|U<<4)^(H<<30|U>>>2)^(H<<25|U>>>7),pn=(z>>>14|T<<18)^(z>>>18|T<<14)^(z<<23|T>>>9),mn=(T>>>14|z<<18)^(T>>>18|z<<14)^(T<<23|z>>>9),gn=f[J],jn=gn.high,An=gn.low,On=G+mn,_n=D+pn+(On>>>0>>0?1:0),In=yn+ln;D=q,G=$,q=P,$=R,P=z,R=T,z=F+(_n=(_n=(_n=_n+hn+((On+=vn)>>>0>>0?1:0))+jn+((On+=An)>>>0>>0?1:0))+L+((On+=K)>>>0>>0?1:0))+((T=k+On|0)>>>0>>0?1:0)|0,F=B,k=C,B=N,C=x,N=U,x=H,U=_n+(bn+dn+(In>>>0>>0?1:0))+((H=On+In|0)>>>0>>0?1:0)|0}d=r.low=d+H,r.high=v+U+(d>>>0>>0?1:0),b=i.low=b+x,i.high=l+N+(b>>>0>>0?1:0),p=o.low=p+C,o.high=y+B+(p>>>0>>0?1:0),g=u.low=g+k,u.high=m+F+(g>>>0>>0?1:0),A=s.low=A+T,s.high=j+z+(A>>>0>>0?1:0),_=w.low=_+R,w.high=O+P+(_>>>0>>0?1:0),S=a.low=S+$,a.high=I+q+(S>>>0<$>>>0?1:0),M=h.low=M+G,h.high=E+D+(M>>>0>>0?1:0)},t.prototype.j=function(){var n=this.O,t=n.words,e=8*this._,r=8*n.nSigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(e/4294967296),t[31+(r+128>>>10<<5)]=e,n.nSigBytes=4*t.length,this.S(),this.h.to32()},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.A,data:this.O,nBytes:this._})},t.hash=function(n,e){return new t(e).finalize(n)},t}(i.P)},3354:function(n,t,e){e.d(t,{e:function(){return o}});var r=e(5720),i=e(9054),o=function(){function n(t,e){if(Array.isArray(t)||!t)return this.U=Array.isArray(t)?t:[],void(this.H="number"==typeof e?e:4*this.U.length);if(t instanceof n)return this.U=t.words.slice(),void(this.H=t.nSigBytes);var r;try{t instanceof ArrayBuffer?r=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!r)throw new Error("Invalid argument");for(var i=r.byteLength,o=[],u=0;u>>2]|=r[u]<<24-u%4*8;this.U=o,this.H=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.H},set:function(n){this.H=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.U},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):r.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.U,t=this.H,e=new Uint8Array(t),r=0;r>>2]>>>24-r%4*8&255;return e},n.prototype.concat=function(n){var t=n.words.slice(),e=n.nSigBytes;if(this.clamp(),this.H%4)for(var r=0;r>>2]>>>24-r%4*8&255;this.U[this.H+r>>>2]|=i<<24-(this.H+r)%4*8}else for(r=0;r>>2]=t[r>>>2];return this.H+=e,this},n.prototype.clamp=function(){var n=this.H;this.U[n>>>2]&=4294967295<<32-n%4*8,this.U.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.U.slice(),this.H)},n.random=function(t){for(var e=[],r=0;r"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,e){e.d(t,{p:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var e=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new r.e(e,t/2)}}},8702:function(n,t,e){e.d(t,{m:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(n){for(var t=n.length,e=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new r.e(e,t)}}},4768:function(n,t,e){e.d(t,{d:function(){return i}});var r=e(8702),i={stringify:function(n){try{return decodeURIComponent(escape(r.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return r.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,e){e.d(t,{M:function(){return i}});var r=e(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,r.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==e.g&&e.g.crypto?function(){return e.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function e(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return n[r](o,o.exports,e),o.exports}e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"F",{value:!0})};var r={};return function(){e.r(r),e.d(r,{HmacSHA384:function(){return i}});var n=e(6367),t=e(6324);function i(e,r){return new n.Hmac(new t.SHA384,r).finalize(e)}}(),r}()})); \ No newline at end of file diff --git a/dist/HmacSHA512.js b/dist/HmacSHA512.js index 19b7ece..e4e8c9a 100644 --- a/dist/HmacSHA512.js +++ b/dist/HmacSHA512.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var e=t();for(var r in n.JsCrypto=n.JsCrypto||{},e)n.JsCrypto[r]=e[r]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,e){e.d(t,{Hmac:function(){return i}});var r=e(4768),i=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=r.d.parse(t));var e=n.blockSize,i=4*e;t.nSigBytes>i&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>1|Y<<31)^(X>>>8|Y<<24)^X>>>7,$=(Y>>>1|X<<31)^(Y>>>8|X<<24)^(Y>>>7|X<<25),nn=c[K-2],tn=nn.high,en=nn.low,rn=(tn>>>19|en<<13)^(tn<<3|en>>>29)^tn>>>6,on=(en>>>19|tn<<13)^(en<<3|tn>>>29)^(en>>>6|tn<<26),un=c[K-7],fn=un.high,cn=un.low,sn=c[K-16],wn=sn.high,an=sn.low;Q=(Q=(Q=Z+fn+((L=$+cn)>>>0<$>>>0?1:0))+rn+((L+=on)>>>0>>0?1:0))+wn+((L+=an)>>>0>>0?1:0),V.high=Q,V.low=L}var hn=z&P^~z&q,vn=T&R^~T&D,dn=_&x^_&H^x&H,ln=N&C^N&B^C&B,bn=(_>>>28|N<<4)^(_<<30|N>>>2)^(_<<25|N>>>7),yn=(N>>>28|_<<4)^(N<<30|_>>>2)^(N<<25|_>>>7),pn=(z>>>14|T<<18)^(z>>>18|T<<14)^(z<<23|T>>>9),mn=(T>>>14|z<<18)^(T>>>18|z<<14)^(T<<23|z>>>9),gn=f[K],jn=gn.high,An=gn.low,On=J+mn,In=G+pn+(On>>>0>>0?1:0),Mn=yn+ln;G=q,J=D,q=P,D=R,P=z,R=T,z=F+(In=(In=(In=In+hn+((On+=vn)>>>0>>0?1:0))+jn+((On+=An)>>>0>>0?1:0))+Q+((On+=L)>>>0>>0?1:0))+((T=k+On|0)>>>0>>0?1:0)|0,F=H,k=B,H=x,B=C,x=_,C=N,_=In+(bn+dn+(Mn>>>0>>0?1:0))+((N=On+Mn|0)>>>0>>0?1:0)|0}d=r.low=d+N,r.high=v+_+(d>>>0>>0?1:0),b=i.low=b+C,i.high=l+x+(b>>>0>>0?1:0),p=o.low=p+B,o.high=y+H+(p>>>0>>0?1:0),g=u.low=g+k,u.high=m+F+(g>>>0>>0?1:0),A=s.low=A+T,s.high=j+z+(A>>>0>>0?1:0),I=w.low=I+R,w.high=O+P+(I>>>0>>0?1:0),S=a.low=S+D,a.high=M+q+(S>>>0>>0?1:0),E=h.low=E+J,h.high=U+G+(E>>>0>>0?1:0)},t.prototype.O=function(){var n=this.I,t=n.words,e=8*this.S,r=8*n.nSigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(e/4294967296),t[31+(r+128>>>10<<5)]=e,n.nSigBytes=4*t.length,this.U(),this.v.to32()},t.prototype.clone=function(){return new t({hash:this.v,blockSize:this.h,data:this.I,nBytes:this.S})},t.hash=function(n,e){return new t(e).finalize(n)},t}(i.P)},3354:function(n,t,e){e.d(t,{e:function(){return o}});var r=e(5720),i=e(9054),o=function(){function n(t,e){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.N="number"==typeof e?e:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.N=t.nSigBytes);var r;try{t instanceof ArrayBuffer?r=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!r)throw new Error("Invalid argument");for(var i=r.byteLength,o=[],u=0;u>>2]|=r[u]<<24-u%4*8;this._=o,this.N=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.N},set:function(n){this.N=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):r.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.N,e=new Uint8Array(t),r=0;r>>2]>>>24-r%4*8&255;return e},n.prototype.concat=function(n){var t=n.words.slice(),e=n.nSigBytes;if(this.clamp(),this.N%4)for(var r=0;r>>2]>>>24-r%4*8&255;this._[this.N+r>>>2]|=i<<24-(this.N+r)%4*8}else for(r=0;r>>2]=t[r>>>2];return this.N+=e,this},n.prototype.clamp=function(){var n=this.N;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.N)},n.random=function(t){for(var e=[],r=0;r"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,e){e.d(t,{p:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var e=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new r.e(e,t/2)}}},8702:function(n,t,e){e.d(t,{m:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(n){for(var t=n.length,e=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new r.e(e,t)}}},4768:function(n,t,e){e.d(t,{d:function(){return i}});var r=e(8702),i={stringify:function(n){try{return decodeURIComponent(escape(r.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return r.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,e){e.d(t,{M:function(){return i}});var r=e(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,r.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==e.g&&e.g.crypto?function(){return e.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function e(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return n[r](o,o.exports,e),o.exports}e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"F",{value:!0})};var r={};return function(){e.r(r),e.d(r,{HmacSHA512:function(){return i}});var n=e(6367),t=e(7491);function i(e,r){return new n.Hmac(new t.SHA512,r).finalize(e)}}(),r}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var e=t();for(var r in n.JsCrypto=n.JsCrypto||{},e)n.JsCrypto[r]=e[r]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,e){e.d(t,{Hmac:function(){return i}});var r=e(4768),i=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=r.d.parse(t));var e=n.blockSize,i=4*e;t.nSigBytes>i&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>1|X<<31)^(W>>>8|X<<24)^W>>>7,Z=(X>>>1|W<<31)^(X>>>8|W<<24)^(X>>>7|W<<25),nn=c[J-2],tn=nn.high,en=nn.low,rn=(tn>>>19|en<<13)^(tn<<3|en>>>29)^tn>>>6,on=(en>>>19|tn<<13)^(en<<3|tn>>>29)^(en>>>6|tn<<26),un=c[J-7],fn=un.high,cn=un.low,sn=c[J-16],wn=sn.high,an=sn.low;L=(L=(L=Y+fn+((K=Z+cn)>>>0>>0?1:0))+rn+((K+=on)>>>0>>0?1:0))+wn+((K+=an)>>>0>>0?1:0),Q.high=L,Q.low=K}var hn=z&P^~z&q,vn=T&R^~T&$,dn=_&x^_&C^x&C,ln=N&H^N&F^H&F,bn=(_>>>28|N<<4)^(_<<30|N>>>2)^(_<<25|N>>>7),yn=(N>>>28|_<<4)^(N<<30|_>>>2)^(N<<25|_>>>7),pn=(z>>>14|T<<18)^(z>>>18|T<<14)^(z<<23|T>>>9),mn=(T>>>14|z<<18)^(T>>>18|z<<14)^(T<<23|z>>>9),gn=f[J],jn=gn.high,An=gn.low,On=G+mn,In=D+pn+(On>>>0>>0?1:0),En=yn+ln;D=q,G=$,q=P,$=R,P=z,R=T,z=B+(In=(In=(In=In+hn+((On+=vn)>>>0>>0?1:0))+jn+((On+=An)>>>0>>0?1:0))+L+((On+=K)>>>0>>0?1:0))+((T=k+On|0)>>>0>>0?1:0)|0,B=C,k=F,C=x,F=H,x=_,H=N,_=In+(bn+dn+(En>>>0>>0?1:0))+((N=On+En|0)>>>0>>0?1:0)|0}d=r.low=d+N,r.high=v+_+(d>>>0>>0?1:0),b=i.low=b+H,i.high=l+x+(b>>>0>>0?1:0),p=o.low=p+F,o.high=y+C+(p>>>0>>0?1:0),g=u.low=g+k,u.high=m+B+(g>>>0>>0?1:0),A=s.low=A+T,s.high=j+z+(A>>>0>>0?1:0),I=w.low=I+R,w.high=O+P+(I>>>0>>0?1:0),M=a.low=M+$,a.high=E+q+(M>>>0<$>>>0?1:0),U=h.low=U+G,h.high=S+D+(U>>>0>>0?1:0)},t.prototype.O=function(){var n=this.I,t=n.words,e=8*this.S,r=8*n.nSigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(e/4294967296),t[31+(r+128>>>10<<5)]=e,n.nSigBytes=4*t.length,this.U(),this.v.to32()},t.prototype.clone=function(){return new t({hash:this.v,blockSize:this.h,data:this.I,nBytes:this.S})},t.hash=function(n,e){return new t(e).finalize(n)},t}(i.P)},3354:function(n,t,e){e.d(t,{e:function(){return o}});var r=e(5720),i=e(9054),o=function(){function n(t,e){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.N="number"==typeof e?e:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.N=t.nSigBytes);var r;try{t instanceof ArrayBuffer?r=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!r)throw new Error("Invalid argument");for(var i=r.byteLength,o=[],u=0;u>>2]|=r[u]<<24-u%4*8;this._=o,this.N=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.N},set:function(n){this.N=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):r.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.N,e=new Uint8Array(t),r=0;r>>2]>>>24-r%4*8&255;return e},n.prototype.concat=function(n){var t=n.words.slice(),e=n.nSigBytes;if(this.clamp(),this.N%4)for(var r=0;r>>2]>>>24-r%4*8&255;this._[this.N+r>>>2]|=i<<24-(this.N+r)%4*8}else for(r=0;r>>2]=t[r>>>2];return this.N+=e,this},n.prototype.clamp=function(){var n=this.N;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.N)},n.random=function(t){for(var e=[],r=0;r"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,e){e.d(t,{p:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var e=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new r.e(e,t/2)}}},8702:function(n,t,e){e.d(t,{m:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(n){for(var t=n.length,e=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new r.e(e,t)}}},4768:function(n,t,e){e.d(t,{d:function(){return i}});var r=e(8702),i={stringify:function(n){try{return decodeURIComponent(escape(r.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return r.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,e){e.d(t,{M:function(){return i}});var r=e(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,r.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==e.g&&e.g.crypto?function(){return e.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function e(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return n[r](o,o.exports,e),o.exports}e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"B",{value:!0})};var r={};return function(){e.r(r),e.d(r,{HmacSHA512:function(){return i}});var n=e(6367),t=e(7491);function i(e,r){return new n.Hmac(new t.SHA512,r).finalize(e)}}(),r}()})); \ No newline at end of file diff --git a/dist/MD5.js b/dist/MD5.js index a511923..20a1e74 100644 --- a/dist/MD5.js +++ b/dist/MD5.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.t=o,this.i=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.t[this.i+i>>>2]|=e<<24-(this.i+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"S",{value:!0})};var i={};return function(){r.r(i),r.d(i,{MD5:function(){return h}});var n,t=r(3354),e=r(1868),o=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),u=[];function f(n,t,r,i,e,o,u){var f=n+(t&r|~t&i)+e+u;return(f<>>32-o)+t}function c(n,t,r,i,e,o,u){var f=n+(t&i|r&~i)+e+u;return(f<>>32-o)+t}function a(n,t,r,i,e,o,u){var f=n+(t^r^i)+e+u;return(f<>>32-o)+t}function s(n,t,r,i,e,o,u){var f=n+(r^(t|~i))+e+u;return(f<>>32-o)+t}!function(){for(var n=0;n<64;n++)u[n]=4294967296*Math.abs(Math.sin(n+1))|0}();var h=function(n){function r(r){var i=n.call(this,r)||this;return i.N=new t.e([1732584193,4023233417,2562383102,271733878]),r&&void 0!==r.hash&&(i.N=r.hash.clone()),i}return o(r,n),r.prototype.U=function(){this.N=new t.e([1732584193,4023233417,2562383102,271733878])},r.prototype.I=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this.N.words,h=n[t],v=n[t+1],d=n[t+2],w=n[t+3],l=n[t+4],y=n[t+5],b=n[t+6],p=n[t+7],m=n[t+8],g=n[t+9],j=n[t+10],A=n[t+11],M=n[t+12],O=n[t+13],I=n[t+14],U=n[t+15],E=o[0],_=o[1],S=o[2],N=o[3];E=f(E,_,S,N,h,7,u[0]),N=f(N,E,_,S,v,12,u[1]),S=f(S,N,E,_,d,17,u[2]),_=f(_,S,N,E,w,22,u[3]),E=f(E,_,S,N,l,7,u[4]),N=f(N,E,_,S,y,12,u[5]),S=f(S,N,E,_,b,17,u[6]),_=f(_,S,N,E,p,22,u[7]),E=f(E,_,S,N,m,7,u[8]),N=f(N,E,_,S,g,12,u[9]),S=f(S,N,E,_,j,17,u[10]),_=f(_,S,N,E,A,22,u[11]),E=f(E,_,S,N,M,7,u[12]),N=f(N,E,_,S,O,12,u[13]),S=f(S,N,E,_,I,17,u[14]),E=c(E,_=f(_,S,N,E,U,22,u[15]),S,N,v,5,u[16]),N=c(N,E,_,S,b,9,u[17]),S=c(S,N,E,_,A,14,u[18]),_=c(_,S,N,E,h,20,u[19]),E=c(E,_,S,N,y,5,u[20]),N=c(N,E,_,S,j,9,u[21]),S=c(S,N,E,_,U,14,u[22]),_=c(_,S,N,E,l,20,u[23]),E=c(E,_,S,N,g,5,u[24]),N=c(N,E,_,S,I,9,u[25]),S=c(S,N,E,_,w,14,u[26]),_=c(_,S,N,E,m,20,u[27]),E=c(E,_,S,N,O,5,u[28]),N=c(N,E,_,S,d,9,u[29]),S=c(S,N,E,_,p,14,u[30]),E=a(E,_=c(_,S,N,E,M,20,u[31]),S,N,y,4,u[32]),N=a(N,E,_,S,m,11,u[33]),S=a(S,N,E,_,A,16,u[34]),_=a(_,S,N,E,I,23,u[35]),E=a(E,_,S,N,v,4,u[36]),N=a(N,E,_,S,l,11,u[37]),S=a(S,N,E,_,p,16,u[38]),_=a(_,S,N,E,j,23,u[39]),E=a(E,_,S,N,O,4,u[40]),N=a(N,E,_,S,h,11,u[41]),S=a(S,N,E,_,w,16,u[42]),_=a(_,S,N,E,b,23,u[43]),E=a(E,_,S,N,g,4,u[44]),N=a(N,E,_,S,M,11,u[45]),S=a(S,N,E,_,U,16,u[46]),E=s(E,_=a(_,S,N,E,d,23,u[47]),S,N,h,6,u[48]),N=s(N,E,_,S,p,10,u[49]),S=s(S,N,E,_,I,15,u[50]),_=s(_,S,N,E,y,21,u[51]),E=s(E,_,S,N,M,6,u[52]),N=s(N,E,_,S,w,10,u[53]),S=s(S,N,E,_,j,15,u[54]),_=s(_,S,N,E,v,21,u[55]),E=s(E,_,S,N,m,6,u[56]),N=s(N,E,_,S,U,10,u[57]),S=s(S,N,E,_,b,15,u[58]),_=s(_,S,N,E,O,21,u[59]),E=s(E,_,S,N,l,6,u[60]),N=s(N,E,_,S,A,10,u[61]),S=s(S,N,E,_,d,15,u[62]),_=s(_,S,N,E,g,21,u[63]),o[0]=o[0]+E|0,o[1]=o[1]+_|0,o[2]=o[2]+S|0,o[3]=o[3]+N|0},r.prototype._=function(){var n=this.l,t=n.words,r=8*this.j,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32;var e=Math.floor(r/4294967296),o=r;t[15+(i+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n.nSigBytes=4*(t.length+1),this.O();for(var u=this.N,f=u.words,c=0;c<4;c++){var a=f[c];f[c]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return u},r.prototype.clone=function(){return new r({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},r.hash=function(n){return(new r).finalize(n)},r}(e.P)}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.t=o,this.i=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.t[this.i+i>>>2]|=e<<24-(this.i+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"S",{value:!0})};var i={};return function(){r.r(i),r.d(i,{MD5:function(){return h}});var n,t=r(3354),e=r(1868),o=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),u=[];function f(n,t,r,i,e,o,u){var f=n+(t&r|~t&i)+e+u;return(f<>>32-o)+t}function a(n,t,r,i,e,o,u){var f=n+(t&i|r&~i)+e+u;return(f<>>32-o)+t}function c(n,t,r,i,e,o,u){var f=n+(t^r^i)+e+u;return(f<>>32-o)+t}function s(n,t,r,i,e,o,u){var f=n+(r^(t|~i))+e+u;return(f<>>32-o)+t}!function(){for(var n=0;n<64;n++)u[n]=4294967296*Math.abs(Math.sin(n+1))|0}();var h=function(n){function r(r){var i=n.call(this,r)||this;return i.N=new t.e([1732584193,4023233417,2562383102,271733878]),r&&void 0!==r.hash&&(i.N=r.hash.clone()),i}return o(r,n),r.prototype.U=function(){this.N=new t.e([1732584193,4023233417,2562383102,271733878])},r.prototype.I=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this.N.words,h=n[t],v=n[t+1],d=n[t+2],w=n[t+3],l=n[t+4],y=n[t+5],b=n[t+6],p=n[t+7],m=n[t+8],g=n[t+9],j=n[t+10],A=n[t+11],M=n[t+12],O=n[t+13],I=n[t+14],E=n[t+15],U=o[0],_=o[1],S=o[2],N=o[3];U=f(U,_,S,N,h,7,u[0]),N=f(N,U,_,S,v,12,u[1]),S=f(S,N,U,_,d,17,u[2]),_=f(_,S,N,U,w,22,u[3]),U=f(U,_,S,N,l,7,u[4]),N=f(N,U,_,S,y,12,u[5]),S=f(S,N,U,_,b,17,u[6]),_=f(_,S,N,U,p,22,u[7]),U=f(U,_,S,N,m,7,u[8]),N=f(N,U,_,S,g,12,u[9]),S=f(S,N,U,_,j,17,u[10]),_=f(_,S,N,U,A,22,u[11]),U=f(U,_,S,N,M,7,u[12]),N=f(N,U,_,S,O,12,u[13]),S=f(S,N,U,_,I,17,u[14]),U=a(U,_=f(_,S,N,U,E,22,u[15]),S,N,v,5,u[16]),N=a(N,U,_,S,b,9,u[17]),S=a(S,N,U,_,A,14,u[18]),_=a(_,S,N,U,h,20,u[19]),U=a(U,_,S,N,y,5,u[20]),N=a(N,U,_,S,j,9,u[21]),S=a(S,N,U,_,E,14,u[22]),_=a(_,S,N,U,l,20,u[23]),U=a(U,_,S,N,g,5,u[24]),N=a(N,U,_,S,I,9,u[25]),S=a(S,N,U,_,w,14,u[26]),_=a(_,S,N,U,m,20,u[27]),U=a(U,_,S,N,O,5,u[28]),N=a(N,U,_,S,d,9,u[29]),S=a(S,N,U,_,p,14,u[30]),U=c(U,_=a(_,S,N,U,M,20,u[31]),S,N,y,4,u[32]),N=c(N,U,_,S,m,11,u[33]),S=c(S,N,U,_,A,16,u[34]),_=c(_,S,N,U,I,23,u[35]),U=c(U,_,S,N,v,4,u[36]),N=c(N,U,_,S,l,11,u[37]),S=c(S,N,U,_,p,16,u[38]),_=c(_,S,N,U,j,23,u[39]),U=c(U,_,S,N,O,4,u[40]),N=c(N,U,_,S,h,11,u[41]),S=c(S,N,U,_,w,16,u[42]),_=c(_,S,N,U,b,23,u[43]),U=c(U,_,S,N,g,4,u[44]),N=c(N,U,_,S,M,11,u[45]),S=c(S,N,U,_,E,16,u[46]),U=s(U,_=c(_,S,N,U,d,23,u[47]),S,N,h,6,u[48]),N=s(N,U,_,S,p,10,u[49]),S=s(S,N,U,_,I,15,u[50]),_=s(_,S,N,U,y,21,u[51]),U=s(U,_,S,N,M,6,u[52]),N=s(N,U,_,S,w,10,u[53]),S=s(S,N,U,_,j,15,u[54]),_=s(_,S,N,U,v,21,u[55]),U=s(U,_,S,N,m,6,u[56]),N=s(N,U,_,S,E,10,u[57]),S=s(S,N,U,_,b,15,u[58]),_=s(_,S,N,U,O,21,u[59]),U=s(U,_,S,N,l,6,u[60]),N=s(N,U,_,S,A,10,u[61]),S=s(S,N,U,_,d,15,u[62]),_=s(_,S,N,U,g,21,u[63]),o[0]=o[0]+U|0,o[1]=o[1]+_|0,o[2]=o[2]+S|0,o[3]=o[3]+N|0},r.prototype._=function(){var n=this.l,t=n.words,r=8*this.j,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32;var e=Math.floor(r/4294967296),o=r;t[15+(i+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n.nSigBytes=4*(t.length+1),this.O();for(var u=this.N,f=u.words,a=0;a<4;a++){var c=f[a];f[a]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return u},r.prototype.clone=function(){return new r({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},r.hash=function(n){return(new r).finalize(n)},r}(e.P)}(),i}()})); \ No newline at end of file diff --git a/dist/OpenSSLKDF.js b/dist/OpenSSLKDF.js index 16b4618..e145ae7 100644 --- a/dist/OpenSSLKDF.js +++ b/dist/OpenSSLKDF.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.A=function(){var n=this.O.words,t=8*this._,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.I(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.S,data:this.O,nBytes:this._})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.U=Array.isArray(t)?t:[],void(this.N="number"==typeof r?r:4*this.U.length);if(t instanceof n)return this.U=t.words.slice(),void(this.N=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.U=o,this.N=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.N},set:function(n){this.N=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.U},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.U,t=this.N,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.N%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.U[this.N+i>>>2]|=e<<24-(this.N+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.N+=r,this},n.prototype.clamp=function(){var n=this.N;this.U[n>>>2]&=4294967295<<32-n%4*8,this.U.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.U.slice(),this.N)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"H",{value:!0})};var i={};return function(){r.r(i),r.d(i,{OpenSSLKDF:function(){return y}});for(var n=r(3354),t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(r[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|r[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=t.charAt(64);if(c)for(;e.length%4;)e.push(c);return e.join("")},parse:function(r){var i=r.length,o=t.charAt(64);if(o){var u=r.indexOf(o);-1!==u&&(i=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new n.e(f,c)}},c={stringify:function(t){var r=t.cipherText,i=t.salt;return r?i?new n.e([1398893684,1701076831]).concat(i).concat(r).toString(f):r.toString(f):""},parse:function(t){var r,i=f.parse(t),e=i.words;return 1398893684===e[0]&&1701076831===e[1]&&(r=new n.e(e.slice(2,4)),e.splice(0,4),i.nSigBytes-=16),new s({cipherText:i,salt:r})}},s=function(){function n(n){this.formatter=c,n&&(this.cipherText=n.cipherText,this.key=n.key,this.iv=n.iv,this.salt=n.salt,this.Algorithm=n.Algorithm,this.mode=n.mode,this.padding=n.padding,this.blockSize=n.blockSize,this.formatter=n.formatter||c)}return n.prototype.toString=function(n){return(n||this.formatter).stringify(this)},n}(),a=r(5561),h=r(6367),v=function(){function n(n){this.v=n}return n.prototype.compute=function(n,t){throw new Error("Not implemented")},n.getKey=function(n,t,r){throw new Error("Not implemented")},n}(),w=(u=function(n,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}u(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),d=function(t){function r(n){var r=t.call(this,n)||this;return r.T=4,r.B=a.SHA256,r.R=1e4,n&&(r.T=void 0!==n.keySize?n.keySize:r.T,r.B=void 0!==n.Hasher?n.Hasher:r.B,r.R=void 0!==n.iterations?n.iterations:r.R),r}return w(r,t),r.prototype.compute=function(t,r){for(var i=new h.Hmac(new this.B,t),e=new n.e,o=new n.e([1]),u=e.words,f=o.words,c=this.T,s=this.R;u.lengthe&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.A=function(){var n=this.O.words,t=8*this.I,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this._(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.S,data:this.O,nBytes:this.I})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.U=Array.isArray(t)?t:[],void(this.N="number"==typeof r?r:4*this.U.length);if(t instanceof n)return this.U=t.words.slice(),void(this.N=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.U=o,this.N=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.N},set:function(n){this.N=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.U},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.U,t=this.N,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.N%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.U[this.N+i>>>2]|=e<<24-(this.N+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.N+=r,this},n.prototype.clamp=function(){var n=this.N;this.U[n>>>2]&=4294967295<<32-n%4*8,this.U.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.U.slice(),this.N)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"H",{value:!0})};var i={};return function(){r.r(i),r.d(i,{OpenSSLKDF:function(){return y}});for(var n=r(3354),t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(r[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|r[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=t.charAt(64);if(c)for(;e.length%4;)e.push(c);return e.join("")},parse:function(r){var i=r.length,o=t.charAt(64);if(o){var u=r.indexOf(o);-1!==u&&(i=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new n.e(f,c)}},c={stringify:function(t){var r=t.cipherText,i=t.salt;return r?i?new n.e([1398893684,1701076831]).concat(i).concat(r).toString(f):r.toString(f):""},parse:function(t){var r,i=f.parse(t),e=i.words;return 1398893684===e[0]&&1701076831===e[1]&&(r=new n.e(e.slice(2,4)),e.splice(0,4),i.nSigBytes-=16),new s({cipherText:i,salt:r})}},s=function(){function n(n){this.formatter=c,n&&(this.cipherText=n.cipherText,this.key=n.key,this.iv=n.iv,this.salt=n.salt,this.Algorithm=n.Algorithm,this.mode=n.mode,this.padding=n.padding,this.blockSize=n.blockSize,this.formatter=n.formatter||c)}return n.prototype.toString=function(n){return(n||this.formatter).stringify(this)},n}(),a=r(5561),h=r(6367),v=function(){function n(n){this.v=n}return n.prototype.compute=function(n,t){throw new Error("Not implemented")},n.getKey=function(n,t,r){throw new Error("Not implemented")},n}(),w=(u=function(n,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}u(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),d=function(t){function r(n){var r=t.call(this,n)||this;return r.T=4,r.B=a.SHA256,r.R=1e4,n&&(r.T=void 0!==n.keySize?n.keySize:r.T,r.B=void 0!==n.Hasher?n.Hasher:r.B,r.R=void 0!==n.iterations?n.iterations:r.R),r}return w(r,t),r.prototype.compute=function(t,r){for(var i=new h.Hmac(new this.B,t),e=new n.e,o=new n.e([1]),u=e.words,f=o.words,c=this.T,s=this.R;u.lengthe&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.A=function(){var n=this.O.words,t=8*this._,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.I(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.U,data:this.O,nBytes:this._})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.N=Array.isArray(t)?t:[],void(this.S="number"==typeof r?r:4*this.N.length);if(t instanceof n)return this.N=t.words.slice(),void(this.S=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.N=o,this.S=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.S},set:function(n){this.S=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.N},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.N,t=this.S,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.S%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.N[this.S+i>>>2]|=e<<24-(this.S+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.S+=r,this},n.prototype.clamp=function(){var n=this.S;this.N[n>>>2]&=4294967295<<32-n%4*8,this.N.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.N.slice(),this.S)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"k",{value:!0})};var i={};return function(){r.r(i),r.d(i,{PBKDF2:function(){return c}});var n,t=r(5561),e=r(6367),o=r(3354),u=function(){function n(n){this.v=n}return n.prototype.compute=function(n,t){throw new Error("Not implemented")},n.getKey=function(n,t,r){throw new Error("Not implemented")},n}(),f=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),c=function(n){function r(r){var i=n.call(this,r)||this;return i.H=4,i.T=t.SHA256,i.R=1e4,r&&(i.H=void 0!==r.keySize?r.keySize:i.H,i.T=void 0!==r.Hasher?r.Hasher:i.T,i.R=void 0!==r.iterations?r.iterations:i.R),i}return f(r,n),r.prototype.compute=function(n,t){for(var r=new e.Hmac(new this.T,n),i=new o.e,u=new o.e([1]),f=i.words,c=u.words,s=this.H,a=this.R;f.lengthe&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.A=function(){var n=this.O.words,t=8*this._,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.I(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.U,data:this.O,nBytes:this._})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.N=Array.isArray(t)?t:[],void(this.S="number"==typeof r?r:4*this.N.length);if(t instanceof n)return this.N=t.words.slice(),void(this.S=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.N=o,this.S=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.S},set:function(n){this.S=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.N},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.N,t=this.S,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.S%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.N[this.S+i>>>2]|=e<<24-(this.S+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.S+=r,this},n.prototype.clamp=function(){var n=this.S;this.N[n>>>2]&=4294967295<<32-n%4*8,this.N.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.N.slice(),this.S)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"H",{value:!0})};var i={};return function(){r.r(i),r.d(i,{PBKDF2:function(){return c}});var n,t=r(5561),e=r(6367),o=r(3354),u=function(){function n(n){this.v=n}return n.prototype.compute=function(n,t){throw new Error("Not implemented")},n.getKey=function(n,t,r){throw new Error("Not implemented")},n}(),f=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),c=function(n){function r(r){var i=n.call(this,r)||this;return i.k=4,i.T=t.SHA256,i.R=1e4,r&&(i.k=void 0!==r.keySize?r.keySize:i.k,i.T=void 0!==r.Hasher?r.Hasher:i.T,i.R=void 0!==r.iterations?r.iterations:i.R),i}return f(r,n),r.prototype.compute=function(n,t){for(var r=new e.Hmac(new this.T,n),i=new o.e,u=new o.e([1]),f=i.words,c=u.words,s=this.k,a=this.R;f.lengthe&&(t=n.finalize(t)),t.clamp();for(var o=this.h=t.clone(),u=this.v=t.clone(),f=o.words,c=u.words,a=0;a>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&a^~f&s)+c[w]+h[w];v=s,s=a,a=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+a|0,r[6]=r[6]+s|0,r[7]=r[7]+v|0},t.prototype.I=function(){var n=this.N.words,t=8*this.U,r=8*this.N.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.N.nSigBytes=4*n.length,this.T(),this.l},t.prototype.clone=function(){return new t({hash:this.l,blockSize:this.F,data:this.N,nBytes:this.U})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.H=Array.isArray(t)?t:[],void(this.B="number"==typeof r?r:4*this.H.length);if(t instanceof n)return this.H=t.words.slice(),void(this.B=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.H=o,this.B=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.B},set:function(n){this.B=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.H},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.H,t=this.B,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.B%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.H[this.B+i>>>2]|=e<<24-(this.B+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.B+=r,this},n.prototype.clamp=function(){var n=this.B;this.H[n>>>2]&=4294967295<<32-n%4*8,this.H.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.H.slice(),this.B)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,a=0;a>>6-a%4*2;f[c>>>2]|=s<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"Z",{value:!0})};var i={};return function(){r.r(i),r.d(i,{RC4:function(){return c}});var n,t=r(30),e=r(5693),o=r(9109),u=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),f=function(){return(f=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>2]>>>24-o%4*8&255;e=(e+this.S[i]+u)%256;var f=this.S[i];this.S[i]=this.S[e],this.S[e]=f}this.i=this.j=0},t.prototype.k=function(n,t){n[t]^=this.generateKeyStreamWord()},t.prototype.generateKeyStreamWord=function(){for(var n=this.S,t=this.i,r=this.j,i=0,e=0;e<4;e++){r=(r+n[t=(t+1)%256])%256;var o=n[t];n[t]=n[r],n[r]=o,i|=n[(n[t]+n[r])%256]<<24-8*e}return this.i=t,this.j=r,i},t.createEncryptor=function(n,r){return new t(f(f({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(f(f({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?e.E.encrypt(t,n,r,i):o.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?e.E.decrypt(t,n,r,i):o.D.decrypt(t,n,r,i)},t.ivSize=0,t.keySize=8,t}(t.q)}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.u=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.h=t.clone(),u=this.v=t.clone(),f=o.words,c=u.words,a=0;a>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&a^~f&s)+c[w]+h[w];v=s,s=a,a=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+a|0,r[6]=r[6]+s|0,r[7]=r[7]+v|0},t.prototype.k=function(){var n=this.N.words,t=8*this.U,r=8*this.N.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.N.nSigBytes=4*n.length,this.F(),this.l},t.prototype.clone=function(){return new t({hash:this.l,blockSize:this.H,data:this.N,nBytes:this.U})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.T=Array.isArray(t)?t:[],void(this.B="number"==typeof r?r:4*this.T.length);if(t instanceof n)return this.T=t.words.slice(),void(this.B=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.T=o,this.B=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.B},set:function(n){this.B=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.T},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.T,t=this.B,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.B%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.T[this.B+i>>>2]|=e<<24-(this.B+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.B+=r,this},n.prototype.clamp=function(){var n=this.B;this.T[n>>>2]&=4294967295<<32-n%4*8,this.T.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.T.slice(),this.B)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,a=0;a>>6-a%4*2;f[c>>>2]|=s<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"Z",{value:!0})};var i={};return function(){r.r(i),r.d(i,{RC4:function(){return c}});var n,t=r(30),e=r(5693),o=r(9109),u=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),f=function(){return(f=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>2]>>>24-o%4*8&255;e=(e+this.S[i]+u)%256;var f=this.S[i];this.S[i]=this.S[e],this.S[e]=f}this.i=this.j=0},t.prototype.I=function(n,t){n[t]^=this.generateKeyStreamWord()},t.prototype.generateKeyStreamWord=function(){for(var n=this.S,t=this.i,r=this.j,i=0,e=0;e<4;e++){r=(r+n[t=(t+1)%256])%256;var o=n[t];n[t]=n[r],n[r]=o,i|=n[(n[t]+n[r])%256]<<24-8*e}return this.i=t,this.j=r,i},t.createEncryptor=function(n,r){return new t(f(f({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(f(f({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?e.E.encrypt(t,n,r,i):o.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?e.E.decrypt(t,n,r,i):o.D.decrypt(t,n,r,i)},t.ivSize=0,t.keySize=8,t}(t.q)}(),i}()})); \ No newline at end of file diff --git a/dist/RC4Drop.js b/dist/RC4Drop.js index 1acbddf..495212f 100644 --- a/dist/RC4Drop.js +++ b/dist/RC4Drop.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.u=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.h=t.clone(),u=this.v=t.clone(),f=o.words,c=u.words,s=0;s>>2]>>>24-o%4*8&255;e=(e+this.S[i]+u)%256;var f=this.S[i];this.S[i]=this.S[e],this.S[e]=f}this.i=this.j=0},t.prototype.k=function(n,t){n[t]^=this.generateKeyStreamWord()},t.prototype.generateKeyStreamWord=function(){for(var n=this.S,t=this.i,r=this.j,i=0,e=0;e<4;e++){r=(r+n[t=(t+1)%256])%256;var o=n[t];n[t]=n[r],n[r]=o,i|=n[(n[t]+n[r])%256]<<24-8*e}return this.i=t,this.j=r,i},t.createEncryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?o.E.encrypt(t,n,r,i):u.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?o.E.decrypt(t,n,r,i):u.D.decrypt(t,n,r,i)},t.ivSize=0,t.keySize=8,t}(e.q)},5561:function(n,t,r){r.d(t,{SHA256:function(){return v}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[],c=[];function s(n){for(var t=Math.sqrt(n),r=2;r<=t;r++)if(!(n%r))return!1;return!0}function a(n){return 4294967296*(n-(0|n))|0}!function(){for(var n=2,t=0;t<64;)s(n)&&(t<8&&(f[t]=a(Math.pow(n,.5))),c[t]=a(Math.pow(n,1/3)),t++),n++}();var h=[],v=function(n){function t(t){var r=n.call(this,t)||this;return r.I=new o.e(f.slice(0)),r.l=t,t&&void 0!==t.hash&&(r.I=t.hash.clone()),r}return u(t,n),t.prototype.O=function(){this.I=new o.e(f.slice(0))},t.prototype.k=function(n,t){for(var r=this.I.words,i=r[0],e=r[1],o=r[2],u=r[3],f=r[4],s=r[5],a=r[6],v=r[7],w=0;w<64;w++){if(w<16)h[w]=0|n[t+w];else{var d=h[w-15],y=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,b=h[w-2],l=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=y+h[w-7]+l+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.N=function(){var n=this.U.words,t=8*this.T,r=8*this.U.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.U.nSigBytes=4*n.length,this.F(),this.I},t.prototype.clone=function(){return new t({hash:this.I,blockSize:this.H,data:this.U,nBytes:this.T})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.R=Array.isArray(t)?t:[],void(this.B="number"==typeof r?r:4*this.R.length);if(t instanceof n)return this.R=t.words.slice(),void(this.B=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.R=o,this.B=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.B},set:function(n){this.B=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.R},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.R,t=this.B,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.B%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.R[this.B+i>>>2]|=e<<24-(this.B+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.B+=r,this},n.prototype.clamp=function(){var n=this.B;this.R[n>>>2]&=4294967295<<32-n%4*8,this.R.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.R.slice(),this.B)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"Z",{value:!0})};var i={};return function(){r.r(i),r.d(i,{RC4Drop:function(){return c}});var n,t=r(5693),e=r(9109),o=r(4615),u=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),f=function(){return(f=Object.assign||function(n){for(var t,r=1,i=arguments.length;r0;t--)this.generateKeyStreamWord()},r.createEncryptor=function(n,t){return new r(f(f({},t=void 0===t?{}:t),{key:n}))},r.createDecryptor=function(n,t){return new r(f(f({},t=void 0===t?{}:t),{key:n}))},r.encrypt=function(n,i,o){return"string"==typeof i?t.E.encrypt(r,n,i,o):e.D.encrypt(r,n,i,o)},r.decrypt=function(n,i,o){return"string"==typeof i?t.E.decrypt(r,n,i,o):e.D.decrypt(r,n,i,o)},r}(o.RC4)}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.u=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.h=t.clone(),u=this.v=t.clone(),f=o.words,c=u.words,a=0;a>>2]>>>24-o%4*8&255;e=(e+this.S[i]+u)%256;var f=this.S[i];this.S[i]=this.S[e],this.S[e]=f}this.i=this.j=0},t.prototype.k=function(n,t){n[t]^=this.generateKeyStreamWord()},t.prototype.generateKeyStreamWord=function(){for(var n=this.S,t=this.i,r=this.j,i=0,e=0;e<4;e++){r=(r+n[t=(t+1)%256])%256;var o=n[t];n[t]=n[r],n[r]=o,i|=n[(n[t]+n[r])%256]<<24-8*e}return this.i=t,this.j=r,i},t.createEncryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?o.E.encrypt(t,n,r,i):u.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?o.E.decrypt(t,n,r,i):u.D.decrypt(t,n,r,i)},t.ivSize=0,t.keySize=8,t}(e.q)},5561:function(n,t,r){r.d(t,{SHA256:function(){return v}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[],c=[];function a(n){for(var t=Math.sqrt(n),r=2;r<=t;r++)if(!(n%r))return!1;return!0}function s(n){return 4294967296*(n-(0|n))|0}!function(){for(var n=2,t=0;t<64;)a(n)&&(t<8&&(f[t]=s(Math.pow(n,.5))),c[t]=s(Math.pow(n,1/3)),t++),n++}();var h=[],v=function(n){function t(t){var r=n.call(this,t)||this;return r.I=new o.e(f.slice(0)),r.l=t,t&&void 0!==t.hash&&(r.I=t.hash.clone()),r}return u(t,n),t.prototype.O=function(){this.I=new o.e(f.slice(0))},t.prototype.k=function(n,t){for(var r=this.I.words,i=r[0],e=r[1],o=r[2],u=r[3],f=r[4],a=r[5],s=r[6],v=r[7],w=0;w<64;w++){if(w<16)h[w]=0|n[t+w];else{var d=h[w-15],l=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&a^~f&s)+c[w]+h[w];v=s,s=a,a=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+a|0,r[6]=r[6]+s|0,r[7]=r[7]+v|0},t.prototype.N=function(){var n=this.U.words,t=8*this.F,r=8*this.U.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.U.nSigBytes=4*n.length,this.H(),this.I},t.prototype.clone=function(){return new t({hash:this.I,blockSize:this.T,data:this.U,nBytes:this.F})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.R=Array.isArray(t)?t:[],void(this.B="number"==typeof r?r:4*this.R.length);if(t instanceof n)return this.R=t.words.slice(),void(this.B=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.R=o,this.B=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.B},set:function(n){this.B=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.R},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.R,t=this.B,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.B%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.R[this.B+i>>>2]|=e<<24-(this.B+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.B+=r,this},n.prototype.clamp=function(){var n=this.B;this.R[n>>>2]&=4294967295<<32-n%4*8,this.R.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.R.slice(),this.B)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,a=0;a>>6-a%4*2;f[c>>>2]|=s<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"Z",{value:!0})};var i={};return function(){r.r(i),r.d(i,{RC4Drop:function(){return c}});var n,t=r(5693),e=r(9109),o=r(4615),u=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),f=function(){return(f=Object.assign||function(n){for(var t,r=1,i=arguments.length;r0;t--)this.generateKeyStreamWord()},r.createEncryptor=function(n,t){return new r(f(f({},t=void 0===t?{}:t),{key:n}))},r.createDecryptor=function(n,t){return new r(f(f({},t=void 0===t?{}:t),{key:n}))},r.encrypt=function(n,i,o){return"string"==typeof i?t.E.encrypt(r,n,i,o):e.D.encrypt(r,n,i,o)},r.decrypt=function(n,i,o){return"string"==typeof i?t.E.decrypt(r,n,i,o):e.D.decrypt(r,n,i,o)},r}(o.RC4)}(),i}()})); \ No newline at end of file diff --git a/dist/RIPEMD160.js b/dist/RIPEMD160.js index f2b324d..aedcbac 100644 --- a/dist/RIPEMD160.js +++ b/dist/RIPEMD160.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var e in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[e]=r[e]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var e=r(5720),i=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var e;try{t instanceof ArrayBuffer?e=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!e)throw new Error("Invalid argument");for(var i=e.byteLength,o=[],u=0;u>>2]|=e[u]<<24-u%4*8;this.t=o,this.i=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):e.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),e=0;e>>2]>>>24-e%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var e=0;e>>2]>>>24-e%4*8&255;this.t[this.i+e>>>2]|=i<<24-(this.i+e)%4*8}else for(e=0;e>>2]=t[e>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],e=0;e"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return i}});var e=r(3354),i={stringify:function(n){for(var t=n.nSigBytes,r=n.words,e=[],i=0;i>>2]>>>24-i%4*8&255;e.push((o>>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new e.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return i}});var e=r(3354),i={stringify:function(n){for(var t=n.nSigBytes,r=n.words,e=[],i=0;i>>2]>>>24-i%4*8&255;e.push(String.fromCharCode(o))}return e.join("")},parse:function(n){for(var t=n.length,r=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new e.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return i}});var e=r(8702),i={stringify:function(n){try{return decodeURIComponent(escape(e.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return e.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return i}});var e=r(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,e.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(e){var i=t[e];if(void 0!==i)return i.exports;var o=t[e]={exports:{}};return n[e](o,o.exports,r),o.exports}r.d=function(n,t){for(var e in t)r.o(t,e)&&!r.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"S",{value:!0})};var e={};return function(){r.r(e),r.d(e,{RIPEMD160:function(){return p}});var n,t=r(1868),i=r(3354),o=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}),u=new i.e([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]),f=new i.e([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]),c=new i.e([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]),a=new i.e([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]),s=new i.e([0,1518500249,1859775393,2400959708,2840853838]),h=new i.e([1352829926,1548603684,1836072691,2053994217,0]);function v(n,t,r){return n^t^r}function w(n,t,r){return n&t|~n&r}function d(n,t,r){return(n|~t)^r}function l(n,t,r){return n&r|t&~r}function y(n,t,r){return n^(t|~r)}function b(n,t){return n<>>32-t}var p=function(n){function t(t){var r=n.call(this,t)||this;return r.N=new i.e([1732584193,4023233417,2562383102,271733878,3285377520]),r.v=t,t&&void 0!==t.hash&&(r.N=t.hash.clone()),r}return o(t,n),t.prototype.U=function(){this.N=new i.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.I=function(n,t){for(var r=0;r<16;r++){var e=t+r,i=n[e];n[e]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,p,m,g,j,A,O,I,E,M,U,_=this.N.words,S=s.words,N=h.words,x=u.words,C=f.words,F=c.words,k=a.words;A=o=_[0],O=p=_[1],I=m=_[2],E=g=_[3],M=j=_[4];for(r=0;r<80;r+=1)U=o+n[t+x[r]]|0,U+=r<16?v(p,m,g)+S[0]:r<32?w(p,m,g)+S[1]:r<48?d(p,m,g)+S[2]:r<64?l(p,m,g)+S[3]:y(p,m,g)+S[4],U=(U=b(U|=0,F[r]))+j|0,o=j,j=g,g=b(m,10),m=p,p=U,U=A+n[t+C[r]]|0,U+=r<16?y(O,I,E)+N[0]:r<32?l(O,I,E)+N[1]:r<48?d(O,I,E)+N[2]:r<64?w(O,I,E)+N[3]:v(O,I,E)+N[4],U=(U=b(U|=0,k[r]))+M|0,A=M,M=E,E=b(I,10),I=O,O=U;U=_[1]+m+E|0,_[1]=_[2]+g+M|0,_[2]=_[3]+j+A|0,_[3]=_[4]+o+O|0,_[4]=_[0]+p+I|0,_[0]=U},t.prototype._=function(){var n=this.l,t=n.words,r=8*this.j,e=8*n.nSigBytes;t[e>>>5]|=128<<24-e%32,t[14+(e+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n.nSigBytes=4*(t.length+1),this.O();for(var i=this.N,o=i.words,u=0;u<5;u++){var f=o[u];o[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return i},t.prototype.clone=function(){return new t({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},t.hash=function(n,r){return new t(r).finalize(n)},t}(t.P)}(),e}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var e in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[e]=r[e]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var e=r(5720),i=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var e;try{t instanceof ArrayBuffer?e=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!e)throw new Error("Invalid argument");for(var i=e.byteLength,o=[],u=0;u>>2]|=e[u]<<24-u%4*8;this.t=o,this.i=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):e.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),e=0;e>>2]>>>24-e%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var e=0;e>>2]>>>24-e%4*8&255;this.t[this.i+e>>>2]|=i<<24-(this.i+e)%4*8}else for(e=0;e>>2]=t[e>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],e=0;e"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return i}});var e=r(3354),i={stringify:function(n){for(var t=n.nSigBytes,r=n.words,e=[],i=0;i>>2]>>>24-i%4*8&255;e.push((o>>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new e.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return i}});var e=r(3354),i={stringify:function(n){for(var t=n.nSigBytes,r=n.words,e=[],i=0;i>>2]>>>24-i%4*8&255;e.push(String.fromCharCode(o))}return e.join("")},parse:function(n){for(var t=n.length,r=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new e.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return i}});var e=r(8702),i={stringify:function(n){try{return decodeURIComponent(escape(e.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return e.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return i}});var e=r(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,e.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(e){var i=t[e];if(void 0!==i)return i.exports;var o=t[e]={exports:{}};return n[e](o,o.exports,r),o.exports}r.d=function(n,t){for(var e in t)r.o(t,e)&&!r.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"S",{value:!0})};var e={};return function(){r.r(e),r.d(e,{RIPEMD160:function(){return p}});var n,t=r(1868),i=r(3354),o=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}),u=new i.e([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]),f=new i.e([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]),c=new i.e([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]),a=new i.e([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]),s=new i.e([0,1518500249,1859775393,2400959708,2840853838]),h=new i.e([1352829926,1548603684,1836072691,2053994217,0]);function v(n,t,r){return n^t^r}function w(n,t,r){return n&t|~n&r}function d(n,t,r){return(n|~t)^r}function l(n,t,r){return n&r|t&~r}function y(n,t,r){return n^(t|~r)}function b(n,t){return n<>>32-t}var p=function(n){function t(t){var r=n.call(this,t)||this;return r.N=new i.e([1732584193,4023233417,2562383102,271733878,3285377520]),r.v=t,t&&void 0!==t.hash&&(r.N=t.hash.clone()),r}return o(t,n),t.prototype.U=function(){this.N=new i.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.O=function(n,t){for(var r=0;r<16;r++){var e=t+r,i=n[e];n[e]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,p,m,g,j,A,I,O,E,M,U,_=this.N.words,S=s.words,N=h.words,x=u.words,C=f.words,F=c.words,k=a.words;A=o=_[0],I=p=_[1],O=m=_[2],E=g=_[3],M=j=_[4];for(r=0;r<80;r+=1)U=o+n[t+x[r]]|0,U+=r<16?v(p,m,g)+S[0]:r<32?w(p,m,g)+S[1]:r<48?d(p,m,g)+S[2]:r<64?l(p,m,g)+S[3]:y(p,m,g)+S[4],U=(U=b(U|=0,F[r]))+j|0,o=j,j=g,g=b(m,10),m=p,p=U,U=A+n[t+C[r]]|0,U+=r<16?y(I,O,E)+N[0]:r<32?l(I,O,E)+N[1]:r<48?d(I,O,E)+N[2]:r<64?w(I,O,E)+N[3]:v(I,O,E)+N[4],U=(U=b(U|=0,k[r]))+M|0,A=M,M=E,E=b(O,10),O=I,I=U;U=_[1]+m+E|0,_[1]=_[2]+g+M|0,_[2]=_[3]+j+A|0,_[3]=_[4]+o+I|0,_[4]=_[0]+p+O|0,_[0]=U},t.prototype._=function(){var n=this.l,t=n.words,r=8*this.j,e=8*n.nSigBytes;t[e>>>5]|=128<<24-e%32,t[14+(e+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n.nSigBytes=4*(t.length+1),this.I();for(var i=this.N,o=i.words,u=0;u<5;u++){var f=o[u];o[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return i},t.prototype.clone=function(){return new t({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},t.hash=function(n,r){return new t(r).finalize(n)},t}(t.P)}(),e}()})); \ No newline at end of file diff --git a/dist/Rabbit.js b/dist/Rabbit.js index 8e1f098..81156e0 100644 --- a/dist/Rabbit.js +++ b/dist/Rabbit.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.i=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.u=t.clone(),u=this.h=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=l+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.A=function(){var n=this.k.words,t=8*this.I,r=8*this.k.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.k.nSigBytes=4*n.length,this.N(),this.v},t.prototype.clone=function(){return new t({hash:this.v,blockSize:this.U,data:this.k,nBytes:this.I})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.T=Array.isArray(t)?t:[],void(this.F="number"==typeof r?r:4*this.T.length);if(t instanceof n)return this.T=t.words.slice(),void(this.F=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.T=o,this.F=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.F},set:function(n){this.F=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.T},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.T,t=this.F,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.F%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.T[this.F+i>>>2]|=e<<24-(this.F+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.F+=r,this},n.prototype.clamp=function(){var n=this.F;this.T[n>>>2]&=4294967295<<32-n%4*8,this.T.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.T.slice(),this.F)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"Y",{value:!0})};var i={};return function(){r.r(i),r.d(i,{Rabbit:function(){return c}});var n,t=r(30),e=r(5693),o=r(9109),u=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),f=function(){return(f=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>24)|4278255360&(n[r]<<24|n[r]>>>8);var i=this.Z=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],e=this.$=[n[2]<<16|n[2]>>>16,4294901760&n[0]|65535&n[1],n[3]<<16|n[3]>>>16,4294901760&n[1]|65535&n[2],n[0]<<16|n[0]>>>16,4294901760&n[2]|65535&n[3],n[1]<<16|n[1]>>>16,4294901760&n[3]|65535&n[0]];this.nn=0;for(r=0;r<4;r++)this.nextState();for(r=0;r<8;r++)e[r]^=i[r+4&7];if(t){var o=t.words,u=o[0],f=o[1],c=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),s=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),a=c>>>16|4294901760&s,h=s<<16|65535&c;e[0]^=c,e[1]^=a,e[2]^=s,e[3]^=h,e[4]^=c,e[5]^=a,e[6]^=s,e[7]^=h;for(r=0;r<4;r++)this.nextState()}},t.prototype.O=function(n,t){var r=this.Z;this.nextState(),this.S[0]=r[0]^r[5]>>>16^r[3]<<16,this.S[1]=r[2]^r[7]>>>16^r[5]<<16,this.S[2]=r[4]^r[1]>>>16^r[7]<<16,this.S[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)this.S[i]=16711935&(this.S[i]<<8|this.S[i]>>>24)|4278255360&(this.S[i]<<24|this.S[i]>>>8),n[t+i]^=this.S[i]},t.prototype.nextState=function(){for(var n=this.Z,t=this.$,r=0;r<8;r++)this.C[r]=t[r];t[0]=t[0]+1295307597+this.nn|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this.nn=t[7]>>>0>>0?1:0;for(r=0;r<8;r++){var i=n[r]+t[r],e=65535&i,o=i>>>16,u=((e*e>>>17)+e*o>>>15)+o*o,f=((4294901760&i)*i|0)+((65535&i)*i|0);this.G[r]=u^f}var c=this.G;n[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,n[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,n[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,n[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,n[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,n[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,n[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,n[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0},t.createEncryptor=function(n,r){return new t(f(f({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(f(f({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?e.E.encrypt(t,n,r,i):o.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?e.E.decrypt(t,n,r,i):o.D.decrypt(t,n,r,i)},t.ivSize=4,t}(t.q)}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.i=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.u=t.clone(),u=this.h=t.clone(),f=o.words,c=u.words,s=0;s>>7)^(d<<14|d>>>18)^d>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=l+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.A=function(){var n=this.I.words,t=8*this.k,r=8*this.I.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.I.nSigBytes=4*n.length,this.N(),this.v},t.prototype.clone=function(){return new t({hash:this.v,blockSize:this.U,data:this.I,nBytes:this.k})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.F=Array.isArray(t)?t:[],void(this.H="number"==typeof r?r:4*this.F.length);if(t instanceof n)return this.F=t.words.slice(),void(this.H=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.F=o,this.H=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.H},set:function(n){this.H=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.F},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.F,t=this.H,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.H%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.F[this.H+i>>>2]|=e<<24-(this.H+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.H+=r,this},n.prototype.clamp=function(){var n=this.H;this.F[n>>>2]&=4294967295<<32-n%4*8,this.F.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.F.slice(),this.H)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"Y",{value:!0})};var i={};return function(){r.r(i),r.d(i,{Rabbit:function(){return c}});var n,t=r(30),e=r(5693),o=r(9109),u=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),f=function(){return(f=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>24)|4278255360&(n[r]<<24|n[r]>>>8);var i=this.Z=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],e=this.$=[n[2]<<16|n[2]>>>16,4294901760&n[0]|65535&n[1],n[3]<<16|n[3]>>>16,4294901760&n[1]|65535&n[2],n[0]<<16|n[0]>>>16,4294901760&n[2]|65535&n[3],n[1]<<16|n[1]>>>16,4294901760&n[3]|65535&n[0]];this.nn=0;for(r=0;r<4;r++)this.nextState();for(r=0;r<8;r++)e[r]^=i[r+4&7];if(t){var o=t.words,u=o[0],f=o[1],c=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),s=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),a=c>>>16|4294901760&s,h=s<<16|65535&c;e[0]^=c,e[1]^=a,e[2]^=s,e[3]^=h,e[4]^=c,e[5]^=a,e[6]^=s,e[7]^=h;for(r=0;r<4;r++)this.nextState()}},t.prototype.O=function(n,t){var r=this.Z;this.nextState(),this.S[0]=r[0]^r[5]>>>16^r[3]<<16,this.S[1]=r[2]^r[7]>>>16^r[5]<<16,this.S[2]=r[4]^r[1]>>>16^r[7]<<16,this.S[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)this.S[i]=16711935&(this.S[i]<<8|this.S[i]>>>24)|4278255360&(this.S[i]<<24|this.S[i]>>>8),n[t+i]^=this.S[i]},t.prototype.nextState=function(){for(var n=this.Z,t=this.$,r=0;r<8;r++)this.C[r]=t[r];t[0]=t[0]+1295307597+this.nn|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this.nn=t[7]>>>0>>0?1:0;for(r=0;r<8;r++){var i=n[r]+t[r],e=65535&i,o=i>>>16,u=((e*e>>>17)+e*o>>>15)+o*o,f=((4294901760&i)*i|0)+((65535&i)*i|0);this.G[r]=u^f}var c=this.G;n[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,n[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,n[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,n[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,n[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,n[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,n[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,n[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0},t.createEncryptor=function(n,r){return new t(f(f({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(f(f({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?e.E.encrypt(t,n,r,i):o.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?e.E.decrypt(t,n,r,i):o.D.decrypt(t,n,r,i)},t.ivSize=4,t}(t.q)}(),i}()})); \ No newline at end of file diff --git a/dist/SHA1.js b/dist/SHA1.js index 116c159..b7778fd 100644 --- a/dist/SHA1.js +++ b/dist/SHA1.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.t=o,this.i=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.t[this.i+i>>>2]|=e<<24-(this.i+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"S",{value:!0})};var i={};return function(){r.r(i),r.d(i,{SHA1:function(){return f}});var n,t=r(1868),e=r(3354),o=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),u=[],f=function(n){function t(t){var r=n.call(this,t)||this;return r.N=new e.e([1732584193,4023233417,2562383102,271733878,3285377520]),r.v=t,t&&void 0!==t.hash&&(r.N=t.hash.clone()),r}return o(t,n),t.prototype.U=function(){this.N=new e.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.I=function(n,t){for(var r=this.N.words,i=r[0],e=r[1],o=r[2],f=r[3],c=r[4],a=0;a<80;a++){if(a<16)u[a]=0|n[t+a];else{var s=u[a-3]^u[a-8]^u[a-14]^u[a-16];u[a]=s<<1|s>>>31}var h=(i<<5|i>>>27)+c+u[a];h+=a<20?1518500249+(e&o|~e&f):a<40?1859775393+(e^o^f):a<60?(e&o|e&f|o&f)-1894007588:(e^o^f)-899497514,c=f,f=o,o=e<<30|e>>>2,e=i,i=h}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+f|0,r[4]=r[4]+c|0},t.prototype._=function(){var n=this.l.words,t=8*this.j,r=8*this.l.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.l.nSigBytes=4*n.length,this.O(),this.N},t.prototype.clone=function(){return new t({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},t.hash=function(n,r){return new t(r).finalize(n)},t}(t.P)}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.t=o,this.i=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.t[this.i+i>>>2]|=e<<24-(this.i+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"S",{value:!0})};var i={};return function(){r.r(i),r.d(i,{SHA1:function(){return f}});var n,t=r(1868),e=r(3354),o=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),u=[],f=function(n){function t(t){var r=n.call(this,t)||this;return r.N=new e.e([1732584193,4023233417,2562383102,271733878,3285377520]),r.v=t,t&&void 0!==t.hash&&(r.N=t.hash.clone()),r}return o(t,n),t.prototype.U=function(){this.N=new e.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.I=function(n,t){for(var r=this.N.words,i=r[0],e=r[1],o=r[2],f=r[3],c=r[4],a=0;a<80;a++){if(a<16)u[a]=0|n[t+a];else{var s=u[a-3]^u[a-8]^u[a-14]^u[a-16];u[a]=s<<1|s>>>31}var h=(i<<5|i>>>27)+c+u[a];h+=a<20?1518500249+(e&o|~e&f):a<40?1859775393+(e^o^f):a<60?(e&o|e&f|o&f)-1894007588:(e^o^f)-899497514,c=f,f=o,o=e<<30|e>>>2,e=i,i=h}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+f|0,r[4]=r[4]+c|0},t.prototype._=function(){var n=this.l.words,t=8*this.A,r=8*this.l.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.l.nSigBytes=4*n.length,this.O(),this.N},t.prototype.clone=function(){return new t({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.A})},t.hash=function(n,r){return new t(r).finalize(n)},t}(t.P)}(),i}()})); \ No newline at end of file diff --git a/dist/SHA224.js b/dist/SHA224.js index c8eaa0e..81d907e 100644 --- a/dist/SHA224.js +++ b/dist/SHA224.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={5561:function(n,t,r){r.d(t,{SHA256:function(){return v}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[],c=[];function a(n){for(var t=Math.sqrt(n),r=2;r<=t;r++)if(!(n%r))return!1;return!0}function s(n){return 4294967296*(n-(0|n))|0}!function(){for(var n=2,t=0;t<64;)a(n)&&(t<8&&(f[t]=s(Math.pow(n,.5))),c[t]=s(Math.pow(n,1/3)),t++),n++}();var h=[],v=function(n){function t(t){var r=n.call(this,t)||this;return r.t=new o.e(f.slice(0)),r.i=t,t&&void 0!==t.hash&&(r.t=t.hash.clone()),r}return u(t,n),t.prototype.u=function(){this.t=new o.e(f.slice(0))},t.prototype.h=function(n,t){for(var r=this.t.words,i=r[0],e=r[1],o=r[2],u=r[3],f=r[4],a=r[5],s=r[6],v=r[7],w=0;w<64;w++){if(w<16)h[w]=0|n[t+w];else{var d=h[w-15],l=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&a^~f&s)+c[w]+h[w];v=s,s=a,a=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+a|0,r[6]=r[6]+s|0,r[7]=r[7]+v|0},t.prototype.v=function(){var n=this.l.words,t=8*this.j,r=8*this.l.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.l.nSigBytes=4*n.length,this.A(),this.t},t.prototype.clone=function(){return new t({hash:this.t,blockSize:this.O,data:this.l,nBytes:this.j})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.I="number"==typeof r?r:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.I=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this._=o,this.I=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.I},set:function(n){this.I=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.I,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.I%4)for(var i=0;i>>2]>>>24-i%4*8&255;this._[this.I+i>>>2]|=e<<24-(this.I+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.I+=r,this},n.prototype.clamp=function(){var n=this.I;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.I)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"N",{value:!0})};var i={};return function(){r.r(i),r.d(i,{SHA224:function(){return u}});var n,t=r(3354),e=r(5561),o=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),u=function(n){function r(r){var i=n.call(this,r)||this;return i.t=new t.e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),i.i=r,r&&void 0!==r.hash&&(i.t=r.hash.clone()),i}return o(r,n),r.prototype.u=function(){this.t=new t.e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},r.prototype.v=function(){var t=n.prototype.v.call(this);return t.nSigBytes-=4,t},r.prototype.clone=function(){return new r({hash:this.t,blockSize:this.O,data:this.l,nBytes:this.j})},r.hash=function(n,t){return new r(t).finalize(n)},r}(e.SHA256)}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={5561:function(n,t,r){r.d(t,{SHA256:function(){return v}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[],c=[];function a(n){for(var t=Math.sqrt(n),r=2;r<=t;r++)if(!(n%r))return!1;return!0}function s(n){return 4294967296*(n-(0|n))|0}!function(){for(var n=2,t=0;t<64;)a(n)&&(t<8&&(f[t]=s(Math.pow(n,.5))),c[t]=s(Math.pow(n,1/3)),t++),n++}();var h=[],v=function(n){function t(t){var r=n.call(this,t)||this;return r.t=new o.e(f.slice(0)),r.i=t,t&&void 0!==t.hash&&(r.t=t.hash.clone()),r}return u(t,n),t.prototype.u=function(){this.t=new o.e(f.slice(0))},t.prototype.h=function(n,t){for(var r=this.t.words,i=r[0],e=r[1],o=r[2],u=r[3],f=r[4],a=r[5],s=r[6],v=r[7],w=0;w<64;w++){if(w<16)h[w]=0|n[t+w];else{var d=h[w-15],l=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,y=h[w-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;h[w]=l+h[w-7]+b+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&a^~f&s)+c[w]+h[w];v=s,s=a,a=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+a|0,r[6]=r[6]+s|0,r[7]=r[7]+v|0},t.prototype.v=function(){var n=this.l.words,t=8*this.j,r=8*this.l.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.l.nSigBytes=4*n.length,this.A(),this.t},t.prototype.clone=function(){return new t({hash:this.t,blockSize:this.O,data:this.l,nBytes:this.j})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.I="number"==typeof r?r:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.I=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this._=o,this.I=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.I},set:function(n){this.I=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.I,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.I%4)for(var i=0;i>>2]>>>24-i%4*8&255;this._[this.I+i>>>2]|=e<<24-(this.I+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.I+=r,this},n.prototype.clamp=function(){var n=this.I;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.I)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"N",{value:!0})};var i={};return function(){r.r(i),r.d(i,{SHA224:function(){return u}});var n,t=r(3354),e=r(5561),o=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),u=function(n){function r(r){var i=n.call(this,r)||this;return i.t=new t.e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),i.i=r,r&&void 0!==r.hash&&(i.t=r.hash.clone()),i}return o(r,n),r.prototype.u=function(){this.t=new t.e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},r.prototype.v=function(){var t=n.prototype.v.call(this);return t.nSigBytes-=4,t},r.prototype.clone=function(){return new r({hash:this.t,blockSize:this.O,data:this.l,nBytes:this.j})},r.hash=function(n,t){return new r(t).finalize(n)},r}(e.SHA256)}(),i}()})); \ No newline at end of file diff --git a/dist/SHA256.js b/dist/SHA256.js index 39fd1a8..a6bb368 100644 --- a/dist/SHA256.js +++ b/dist/SHA256.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.t=o,this.i=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.t[this.i+i>>>2]|=e<<24-(this.i+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"S",{value:!0})};var i={};return function(){r.r(i),r.d(i,{SHA256:function(){return h}});var n,t=r(1868),e=r(3354),o=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),u=[],f=[];function c(n){for(var t=Math.sqrt(n),r=2;r<=t;r++)if(!(n%r))return!1;return!0}function a(n){return 4294967296*(n-(0|n))|0}!function(){for(var n=2,t=0;t<64;)c(n)&&(t<8&&(u[t]=a(Math.pow(n,.5))),f[t]=a(Math.pow(n,1/3)),t++),n++}();var s=[],h=function(n){function t(t){var r=n.call(this,t)||this;return r.N=new e.e(u.slice(0)),r.v=t,t&&void 0!==t.hash&&(r.N=t.hash.clone()),r}return o(t,n),t.prototype.U=function(){this.N=new e.e(u.slice(0))},t.prototype.I=function(n,t){for(var r=this.N.words,i=r[0],e=r[1],o=r[2],u=r[3],c=r[4],a=r[5],h=r[6],v=r[7],d=0;d<64;d++){if(d<16)s[d]=0|n[t+d];else{var w=s[d-15],l=(w<<25|w>>>7)^(w<<14|w>>>18)^w>>>3,y=s[d-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;s[d]=l+s[d-7]+b+s[d-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&a^~c&h)+f[d]+s[d];v=h,h=a,a=c,c=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+c|0,r[5]=r[5]+a|0,r[6]=r[6]+h|0,r[7]=r[7]+v|0},t.prototype._=function(){var n=this.l.words,t=8*this.j,r=8*this.l.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.l.nSigBytes=4*n.length,this.O(),this.N},t.prototype.clone=function(){return new t({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},t.hash=function(n,r){return new t(r).finalize(n)},t}(t.P)}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.t=o,this.i=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.t[this.i+i>>>2]|=e<<24-(this.i+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"S",{value:!0})};var i={};return function(){r.r(i),r.d(i,{SHA256:function(){return h}});var n,t=r(1868),e=r(3354),o=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),u=[],f=[];function c(n){for(var t=Math.sqrt(n),r=2;r<=t;r++)if(!(n%r))return!1;return!0}function a(n){return 4294967296*(n-(0|n))|0}!function(){for(var n=2,t=0;t<64;)c(n)&&(t<8&&(u[t]=a(Math.pow(n,.5))),f[t]=a(Math.pow(n,1/3)),t++),n++}();var s=[],h=function(n){function t(t){var r=n.call(this,t)||this;return r.N=new e.e(u.slice(0)),r.v=t,t&&void 0!==t.hash&&(r.N=t.hash.clone()),r}return o(t,n),t.prototype.U=function(){this.N=new e.e(u.slice(0))},t.prototype.I=function(n,t){for(var r=this.N.words,i=r[0],e=r[1],o=r[2],u=r[3],c=r[4],a=r[5],h=r[6],v=r[7],d=0;d<64;d++){if(d<16)s[d]=0|n[t+d];else{var w=s[d-15],l=(w<<25|w>>>7)^(w<<14|w>>>18)^w>>>3,y=s[d-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;s[d]=l+s[d-7]+b+s[d-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&a^~c&h)+f[d]+s[d];v=h,h=a,a=c,c=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+c|0,r[5]=r[5]+a|0,r[6]=r[6]+h|0,r[7]=r[7]+v|0},t.prototype._=function(){var n=this.l.words,t=8*this.A,r=8*this.l.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.l.nSigBytes=4*n.length,this.O(),this.N},t.prototype.clone=function(){return new t({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.A})},t.hash=function(n,r){return new t(r).finalize(n)},t}(t.P)}(),i}()})); \ No newline at end of file diff --git a/dist/SHA3.js b/dist/SHA3.js index 3b50c7d..8d969f7 100644 --- a/dist/SHA3.js +++ b/dist/SHA3.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.t=o,this.i=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.t[this.i+i>>>2]|=e<<24-(this.i+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"_",{value:!0})};var i={};return function(){r.r(i),r.d(i,{SHA3:function(){return h}});var n,t=r(6957),e=r(1868),o=r(3354),u=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),f=[],a=[],c=[];!function(){for(var n=1,r=0,i=0;i<24;i++){f[n+5*r]=(i+1)*(i+2)/2%64;var e=(2*n+3*r)%5;n=r%5,r=e}for(var o=0;o<5;o++)for(var u=0;u<5;u++)a[o+5*u]=u+(2*o+3*u)%5*5;for(var s=1,h=0;h<24;h++){for(var v=0,w=0,d=0;d<7;d++){if(1&s){var l=(1<>>24)|4278255360&(o<<24|o>>>8),u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),r[e].high^=u,r[e].low^=o}for(var h=0;h<24;h++){for(var v=0;v<5;v++){for(var w=0,d=0,l=0;l<5;l++){w^=(S=r[v+5*l]).high,d^=S.low}var b=s[v];b.high=w,b.low=d}for(v=0;v<5;v++){var y=s[(v+4)%5],p=s[(v+1)%5],m=p.high,g=p.low;for(w=y.high^(m<<1|g>>>31),d=y.low^(g<<1|m>>>31),l=0;l<5;l++){(S=r[v+5*l]).high^=w,S.low^=d}}for(var j=1;j<25;j++){w=void 0,d=void 0;var A=r[j].high,O=r[j].low,I=f[j];I<32?(w=A<>>32-I,d=O<>>32-I):(w=O<>>64-I,d=A<>>64-I);var U=s[a[j]];U.high=w,U.low=d}var E=s[0],M=r[0];E.high=M.high,E.low=M.low;for(v=0;v<5;v++)for(l=0;l<5;l++){var S=r[j=v+5*l],_=s[j],N=s[(v+1)%5+5*l],x=s[(v+2)%5+5*l];S.high=_.high^~N.high&x.high,S.low=_.low^~N.low&x.low}var C=r[0],B=c[h];C.high^=B.high,C.low^=B.low}},r.prototype.S=function(){var n=this.l,t=n.words,r=8*n.nSigBytes,i=32*this.blockSize;t[r>>>5]|=1<<24-r%32,t[(Math.ceil((r+1)/i)*i>>>5)-1]|=128,n.nSigBytes=4*t.length,this.O();for(var e=this.N,u=this.B/8,f=u/8,a=[],c=0;c>>24)|4278255360&(h<<24|h>>>8),v=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),a.push(v),a.push(h)}return new o.e(a,u)},r.prototype.clone=function(){return new r({outputLength:this.B,state:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},r.hash=function(n,t){return new r(t).finalize(n)},r}(e.P)}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof r?r:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.t=o,this.i=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.i%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.t[this.i+i>>>2]|=e<<24-(this.i+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.i+=r,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"_",{value:!0})};var i={};return function(){r.r(i),r.d(i,{SHA3:function(){return h}});var n,t=r(6957),e=r(1868),o=r(3354),u=(n=function(t,r){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(t,r)},function(t,r){function i(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}),f=[],a=[],c=[];!function(){for(var n=1,r=0,i=0;i<24;i++){f[n+5*r]=(i+1)*(i+2)/2%64;var e=(2*n+3*r)%5;n=r%5,r=e}for(var o=0;o<5;o++)for(var u=0;u<5;u++)a[o+5*u]=u+(2*o+3*u)%5*5;for(var s=1,h=0;h<24;h++){for(var v=0,w=0,d=0;d<7;d++){if(1&s){var l=(1<>>24)|4278255360&(o<<24|o>>>8),u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),r[e].high^=u,r[e].low^=o}for(var h=0;h<24;h++){for(var v=0;v<5;v++){for(var w=0,d=0,l=0;l<5;l++){w^=(S=r[v+5*l]).high,d^=S.low}var b=s[v];b.high=w,b.low=d}for(v=0;v<5;v++){var y=s[(v+4)%5],p=s[(v+1)%5],m=p.high,g=p.low;for(w=y.high^(m<<1|g>>>31),d=y.low^(g<<1|m>>>31),l=0;l<5;l++){(S=r[v+5*l]).high^=w,S.low^=d}}for(var j=1;j<25;j++){w=void 0,d=void 0;var A=r[j].high,O=r[j].low,I=f[j];I<32?(w=A<>>32-I,d=O<>>32-I):(w=O<>>64-I,d=A<>>64-I);var E=s[a[j]];E.high=w,E.low=d}var U=s[0],M=r[0];U.high=M.high,U.low=M.low;for(v=0;v<5;v++)for(l=0;l<5;l++){var S=r[j=v+5*l],_=s[j],N=s[(v+1)%5+5*l],x=s[(v+2)%5+5*l];S.high=_.high^~N.high&x.high,S.low=_.low^~N.low&x.low}var C=r[0],F=c[h];C.high^=F.high,C.low^=F.low}},r.prototype.S=function(){var n=this.l,t=n.words,r=8*n.nSigBytes,i=32*this.blockSize;t[r>>>5]|=1<<24-r%32,t[(Math.ceil((r+1)/i)*i>>>5)-1]|=128,n.nSigBytes=4*t.length,this.O();for(var e=this.N,u=this.F/8,f=u/8,a=[],c=0;c>>24)|4278255360&(h<<24|h>>>8),v=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),a.push(v),a.push(h)}return new o.e(a,u)},r.prototype.clone=function(){return new r({outputLength:this.F,state:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},r.hash=function(n,t){return new r(t).finalize(n)},r}(e.P)}(),i}()})); \ No newline at end of file diff --git a/dist/SHA384.js b/dist/SHA384.js index df2bd51..f20ef30 100644 --- a/dist/SHA384.js +++ b/dist/SHA384.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var e=t();for(var r in n.JsCrypto=n.JsCrypto||{},e)n.JsCrypto[r]=e[r]}}(this,(function(){return function(){"use strict";var n={7491:function(n,t,e){e.d(t,{SHA512:function(){return w}});var r,i=e(1868),o=e(6957),u=(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})(n,t)},function(n,t){function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}),f=[new o.r(1116352408,3609767458),new o.r(1899447441,602891725),new o.r(3049323471,3964484399),new o.r(3921009573,2173295548),new o.r(961987163,4081628472),new o.r(1508970993,3053834265),new o.r(2453635748,2937671579),new o.r(2870763221,3664609560),new o.r(3624381080,2734883394),new o.r(310598401,1164996542),new o.r(607225278,1323610764),new o.r(1426881987,3590304994),new o.r(1925078388,4068182383),new o.r(2162078206,991336113),new o.r(2614888103,633803317),new o.r(3248222580,3479774868),new o.r(3835390401,2666613458),new o.r(4022224774,944711139),new o.r(264347078,2341262773),new o.r(604807628,2007800933),new o.r(770255983,1495990901),new o.r(1249150122,1856431235),new o.r(1555081692,3175218132),new o.r(1996064986,2198950837),new o.r(2554220882,3999719339),new o.r(2821834349,766784016),new o.r(2952996808,2566594879),new o.r(3210313671,3203337956),new o.r(3336571891,1034457026),new o.r(3584528711,2466948901),new o.r(113926993,3758326383),new o.r(338241895,168717936),new o.r(666307205,1188179964),new o.r(773529912,1546045734),new o.r(1294757372,1522805485),new o.r(1396182291,2643833823),new o.r(1695183700,2343527390),new o.r(1986661051,1014477480),new o.r(2177026350,1206759142),new o.r(2456956037,344077627),new o.r(2730485921,1290863460),new o.r(2820302411,3158454273),new o.r(3259730800,3505952657),new o.r(3345764771,106217008),new o.r(3516065817,3606008344),new o.r(3600352804,1432725776),new o.r(4094571909,1467031594),new o.r(275423344,851169720),new o.r(430227734,3100823752),new o.r(506948616,1363258195),new o.r(659060556,3750685593),new o.r(883997877,3785050280),new o.r(958139571,3318307427),new o.r(1322822218,3812723403),new o.r(1537002063,2003034995),new o.r(1747873779,3602036899),new o.r(1955562222,1575990012),new o.r(2024104815,1125592928),new o.r(2227730452,2716904306),new o.r(2361852424,442776044),new o.r(2428436474,593698344),new o.r(2756734187,3733110249),new o.r(3204031479,2999351573),new o.r(3329325298,3815920427),new o.r(3391569614,3928383900),new o.r(3515267271,566280711),new o.r(3940187606,3454069534),new o.r(4118630271,4000239992),new o.r(116418474,1914138554),new o.r(174292421,2731055270),new o.r(289380356,3203993006),new o.r(460393269,320620315),new o.r(685471733,587496836),new o.r(852142971,1086792851),new o.r(1017036298,365543100),new o.r(1126000580,2618297676),new o.r(1288033470,3409855158),new o.r(1501505948,4234509866),new o.r(1607167915,987167468),new o.r(1816402316,1246189591)],c=[];!function(){for(var n=0;n<80;n++)c[n]=new o.r(0,0)}();var w=function(n){function t(t){var e=n.call(this,t)||this;return e.t=32,e.i=new o.m([new o.r(1779033703,4089235720),new o.r(3144134277,2227873595),new o.r(1013904242,4271175723),new o.r(2773480762,1595750129),new o.r(1359893119,2917565137),new o.r(2600822924,725511199),new o.r(528734635,4215389547),new o.r(1541459225,327033209)]),e.u=t,t&&void 0!==t.hash&&(e.i=t.hash.clone()),e}return u(t,n),t.prototype.h=function(){this.i=new o.m([new o.r(1779033703,4089235720),new o.r(3144134277,2227873595),new o.r(1013904242,4271175723),new o.r(2773480762,1595750129),new o.r(1359893119,2917565137),new o.r(2600822924,725511199),new o.r(528734635,4215389547),new o.r(1541459225,327033209)])},t.prototype.v=function(n,t){for(var e=this.i.words,r=e[0],i=e[1],o=e[2],u=e[3],w=e[4],s=e[5],a=e[6],h=e[7],v=r.high,d=r.low,b=i.high,l=i.low,y=o.high,p=o.low,m=u.high,g=u.low,j=w.high,A=w.low,O=s.high,_=s.low,I=a.high,S=a.low,M=h.high,U=h.low,E=v,N=d,x=b,B=l,C=y,k=p,z=m,F=g,H=j,T=A,P=O,R=_,q=I,D=S,G=M,J=U,K=0;K<80;K++){var L=void 0,Q=void 0,V=c[K];if(K<16)Q=V.high=0|n[t+2*K],L=V.low=0|n[t+2*K+1];else{var W=c[K-15],X=W.high,Y=W.low,Z=(X>>>1|Y<<31)^(X>>>8|Y<<24)^X>>>7,$=(Y>>>1|X<<31)^(Y>>>8|X<<24)^(Y>>>7|X<<25),nn=c[K-2],tn=nn.high,en=nn.low,rn=(tn>>>19|en<<13)^(tn<<3|en>>>29)^tn>>>6,on=(en>>>19|tn<<13)^(en<<3|tn>>>29)^(en>>>6|tn<<26),un=c[K-7],fn=un.high,cn=un.low,wn=c[K-16],sn=wn.high,an=wn.low;Q=(Q=(Q=Z+fn+((L=$+cn)>>>0<$>>>0?1:0))+rn+((L+=on)>>>0>>0?1:0))+sn+((L+=an)>>>0>>0?1:0),V.high=Q,V.low=L}var hn=H&P^~H&q,vn=T&R^~T&D,dn=E&x^E&C^x&C,bn=N&B^N&k^B&k,ln=(E>>>28|N<<4)^(E<<30|N>>>2)^(E<<25|N>>>7),yn=(N>>>28|E<<4)^(N<<30|E>>>2)^(N<<25|E>>>7),pn=(H>>>14|T<<18)^(H>>>18|T<<14)^(H<<23|T>>>9),mn=(T>>>14|H<<18)^(T>>>18|H<<14)^(T<<23|H>>>9),gn=f[K],jn=gn.high,An=gn.low,On=J+mn,_n=G+pn+(On>>>0>>0?1:0),In=yn+bn;G=q,J=D,q=P,D=R,P=H,R=T,H=z+(_n=(_n=(_n=_n+hn+((On+=vn)>>>0>>0?1:0))+jn+((On+=An)>>>0>>0?1:0))+Q+((On+=L)>>>0>>0?1:0))+((T=F+On|0)>>>0>>0?1:0)|0,z=C,F=k,C=x,k=B,x=E,B=N,E=_n+(ln+dn+(In>>>0>>0?1:0))+((N=On+In|0)>>>0>>0?1:0)|0}d=r.low=d+N,r.high=v+E+(d>>>0>>0?1:0),l=i.low=l+B,i.high=b+x+(l>>>0>>0?1:0),p=o.low=p+k,o.high=y+C+(p>>>0>>0?1:0),g=u.low=g+F,u.high=m+z+(g>>>0>>0?1:0),A=w.low=A+T,w.high=j+H+(A>>>0>>0?1:0),_=s.low=_+R,s.high=O+P+(_>>>0>>0?1:0),S=a.low=S+D,a.high=I+q+(S>>>0>>0?1:0),U=h.low=U+J,h.high=M+G+(U>>>0>>0?1:0)},t.prototype.l=function(){var n=this.j,t=n.words,e=8*this.A,r=8*n.nSigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(e/4294967296),t[31+(r+128>>>10<<5)]=e,n.nSigBytes=4*t.length,this.O(),this.i.to32()},t.prototype.clone=function(){return new t({hash:this.i,blockSize:this.t,data:this.j,nBytes:this.A})},t.hash=function(n,e){return new t(e).finalize(n)},t}(i.P)},3354:function(n,t,e){e.d(t,{e:function(){return o}});var r=e(5720),i=e(9054),o=function(){function n(t,e){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.I="number"==typeof e?e:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.I=t.nSigBytes);var r;try{t instanceof ArrayBuffer?r=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!r)throw new Error("Invalid argument");for(var i=r.byteLength,o=[],u=0;u>>2]|=r[u]<<24-u%4*8;this._=o,this.I=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.I},set:function(n){this.I=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):r.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.I,e=new Uint8Array(t),r=0;r>>2]>>>24-r%4*8&255;return e},n.prototype.concat=function(n){var t=n.words.slice(),e=n.nSigBytes;if(this.clamp(),this.I%4)for(var r=0;r>>2]>>>24-r%4*8&255;this._[this.I+r>>>2]|=i<<24-(this.I+r)%4*8}else for(r=0;r>>2]=t[r>>>2];return this.I+=e,this},n.prototype.clamp=function(){var n=this.I;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.I)},n.random=function(t){for(var e=[],r=0;r"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,e){e.d(t,{p:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var e=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new r.e(e,t/2)}}},8702:function(n,t,e){e.d(t,{m:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(n){for(var t=n.length,e=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new r.e(e,t)}}},4768:function(n,t,e){e.d(t,{d:function(){return i}});var r=e(8702),i={stringify:function(n){try{return decodeURIComponent(escape(r.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return r.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,e){e.d(t,{M:function(){return i}});var r=e(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,r.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==e.g&&e.g.crypto?function(){return e.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function e(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return n[r](o,o.exports,e),o.exports}e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"N",{value:!0})};var r={};return function(){e.r(r),e.d(r,{SHA384:function(){return u}});var n,t=e(6957),i=e(7491),o=(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=function(n){function e(e){var r=n.call(this,e)||this;return r.i=new t.m([new t.r(3418070365,3238371032),new t.r(1654270250,914150663),new t.r(2438529370,812702999),new t.r(355462360,4144912697),new t.r(1731405415,4290775857),new t.r(2394180231,1750603025),new t.r(3675008525,1694076839),new t.r(1203062813,3204075428)]),r.u=e,e&&void 0!==e.hash&&(r.i=e.hash.clone()),r}return o(e,n),e.prototype.h=function(){this.i=new t.m([new t.r(3418070365,3238371032),new t.r(1654270250,914150663),new t.r(2438529370,812702999),new t.r(355462360,4144912697),new t.r(1731405415,4290775857),new t.r(2394180231,1750603025),new t.r(3675008525,1694076839),new t.r(1203062813,3204075428)])},e.prototype.l=function(){var t=n.prototype.l.call(this);return t.nSigBytes-=16,t},e.prototype.clone=function(){return new e({hash:this.i,blockSize:this.t,data:this.j,nBytes:this.A})},e.hash=function(n,t){return new e(t).finalize(n)},e}(i.SHA512)}(),r}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var e=t();for(var r in n.JsCrypto=n.JsCrypto||{},e)n.JsCrypto[r]=e[r]}}(this,(function(){return function(){"use strict";var n={7491:function(n,t,e){e.d(t,{SHA512:function(){return w}});var r,i=e(1868),o=e(6957),u=(r=function(n,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})(n,t)},function(n,t){function e(){this.constructor=n}r(n,t),n.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)}),f=[new o.r(1116352408,3609767458),new o.r(1899447441,602891725),new o.r(3049323471,3964484399),new o.r(3921009573,2173295548),new o.r(961987163,4081628472),new o.r(1508970993,3053834265),new o.r(2453635748,2937671579),new o.r(2870763221,3664609560),new o.r(3624381080,2734883394),new o.r(310598401,1164996542),new o.r(607225278,1323610764),new o.r(1426881987,3590304994),new o.r(1925078388,4068182383),new o.r(2162078206,991336113),new o.r(2614888103,633803317),new o.r(3248222580,3479774868),new o.r(3835390401,2666613458),new o.r(4022224774,944711139),new o.r(264347078,2341262773),new o.r(604807628,2007800933),new o.r(770255983,1495990901),new o.r(1249150122,1856431235),new o.r(1555081692,3175218132),new o.r(1996064986,2198950837),new o.r(2554220882,3999719339),new o.r(2821834349,766784016),new o.r(2952996808,2566594879),new o.r(3210313671,3203337956),new o.r(3336571891,1034457026),new o.r(3584528711,2466948901),new o.r(113926993,3758326383),new o.r(338241895,168717936),new o.r(666307205,1188179964),new o.r(773529912,1546045734),new o.r(1294757372,1522805485),new o.r(1396182291,2643833823),new o.r(1695183700,2343527390),new o.r(1986661051,1014477480),new o.r(2177026350,1206759142),new o.r(2456956037,344077627),new o.r(2730485921,1290863460),new o.r(2820302411,3158454273),new o.r(3259730800,3505952657),new o.r(3345764771,106217008),new o.r(3516065817,3606008344),new o.r(3600352804,1432725776),new o.r(4094571909,1467031594),new o.r(275423344,851169720),new o.r(430227734,3100823752),new o.r(506948616,1363258195),new o.r(659060556,3750685593),new o.r(883997877,3785050280),new o.r(958139571,3318307427),new o.r(1322822218,3812723403),new o.r(1537002063,2003034995),new o.r(1747873779,3602036899),new o.r(1955562222,1575990012),new o.r(2024104815,1125592928),new o.r(2227730452,2716904306),new o.r(2361852424,442776044),new o.r(2428436474,593698344),new o.r(2756734187,3733110249),new o.r(3204031479,2999351573),new o.r(3329325298,3815920427),new o.r(3391569614,3928383900),new o.r(3515267271,566280711),new o.r(3940187606,3454069534),new o.r(4118630271,4000239992),new o.r(116418474,1914138554),new o.r(174292421,2731055270),new o.r(289380356,3203993006),new o.r(460393269,320620315),new o.r(685471733,587496836),new o.r(852142971,1086792851),new o.r(1017036298,365543100),new o.r(1126000580,2618297676),new o.r(1288033470,3409855158),new o.r(1501505948,4234509866),new o.r(1607167915,987167468),new o.r(1816402316,1246189591)],c=[];!function(){for(var n=0;n<80;n++)c[n]=new o.r(0,0)}();var w=function(n){function t(t){var e=n.call(this,t)||this;return e.t=32,e.i=new o.m([new o.r(1779033703,4089235720),new o.r(3144134277,2227873595),new o.r(1013904242,4271175723),new o.r(2773480762,1595750129),new o.r(1359893119,2917565137),new o.r(2600822924,725511199),new o.r(528734635,4215389547),new o.r(1541459225,327033209)]),e.u=t,t&&void 0!==t.hash&&(e.i=t.hash.clone()),e}return u(t,n),t.prototype.h=function(){this.i=new o.m([new o.r(1779033703,4089235720),new o.r(3144134277,2227873595),new o.r(1013904242,4271175723),new o.r(2773480762,1595750129),new o.r(1359893119,2917565137),new o.r(2600822924,725511199),new o.r(528734635,4215389547),new o.r(1541459225,327033209)])},t.prototype.v=function(n,t){for(var e=this.i.words,r=e[0],i=e[1],o=e[2],u=e[3],w=e[4],s=e[5],a=e[6],h=e[7],v=r.high,d=r.low,l=i.high,b=i.low,y=o.high,p=o.low,m=u.high,g=u.low,j=w.high,A=w.low,O=s.high,_=s.low,I=a.high,S=a.low,E=h.high,M=h.low,U=v,N=d,x=l,B=b,C=y,F=p,k=m,z=g,H=j,T=A,P=O,R=_,q=I,$=S,D=E,G=M,J=0;J<80;J++){var K=void 0,L=void 0,Q=c[J];if(J<16)L=Q.high=0|n[t+2*J],K=Q.low=0|n[t+2*J+1];else{var V=c[J-15],W=V.high,X=V.low,Y=(W>>>1|X<<31)^(W>>>8|X<<24)^W>>>7,Z=(X>>>1|W<<31)^(X>>>8|W<<24)^(X>>>7|W<<25),nn=c[J-2],tn=nn.high,en=nn.low,rn=(tn>>>19|en<<13)^(tn<<3|en>>>29)^tn>>>6,on=(en>>>19|tn<<13)^(en<<3|tn>>>29)^(en>>>6|tn<<26),un=c[J-7],fn=un.high,cn=un.low,wn=c[J-16],sn=wn.high,an=wn.low;L=(L=(L=Y+fn+((K=Z+cn)>>>0>>0?1:0))+rn+((K+=on)>>>0>>0?1:0))+sn+((K+=an)>>>0>>0?1:0),Q.high=L,Q.low=K}var hn=H&P^~H&q,vn=T&R^~T&$,dn=U&x^U&C^x&C,ln=N&B^N&F^B&F,bn=(U>>>28|N<<4)^(U<<30|N>>>2)^(U<<25|N>>>7),yn=(N>>>28|U<<4)^(N<<30|U>>>2)^(N<<25|U>>>7),pn=(H>>>14|T<<18)^(H>>>18|T<<14)^(H<<23|T>>>9),mn=(T>>>14|H<<18)^(T>>>18|H<<14)^(T<<23|H>>>9),gn=f[J],jn=gn.high,An=gn.low,On=G+mn,_n=D+pn+(On>>>0>>0?1:0),In=yn+ln;D=q,G=$,q=P,$=R,P=H,R=T,H=k+(_n=(_n=(_n=_n+hn+((On+=vn)>>>0>>0?1:0))+jn+((On+=An)>>>0>>0?1:0))+L+((On+=K)>>>0>>0?1:0))+((T=z+On|0)>>>0>>0?1:0)|0,k=C,z=F,C=x,F=B,x=U,B=N,U=_n+(bn+dn+(In>>>0>>0?1:0))+((N=On+In|0)>>>0>>0?1:0)|0}d=r.low=d+N,r.high=v+U+(d>>>0>>0?1:0),b=i.low=b+B,i.high=l+x+(b>>>0>>0?1:0),p=o.low=p+F,o.high=y+C+(p>>>0>>0?1:0),g=u.low=g+z,u.high=m+k+(g>>>0>>0?1:0),A=w.low=A+T,w.high=j+H+(A>>>0>>0?1:0),_=s.low=_+R,s.high=O+P+(_>>>0>>0?1:0),S=a.low=S+$,a.high=I+q+(S>>>0<$>>>0?1:0),M=h.low=M+G,h.high=E+D+(M>>>0>>0?1:0)},t.prototype.l=function(){var n=this.j,t=n.words,e=8*this.A,r=8*n.nSigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(e/4294967296),t[31+(r+128>>>10<<5)]=e,n.nSigBytes=4*t.length,this.O(),this.i.to32()},t.prototype.clone=function(){return new t({hash:this.i,blockSize:this.t,data:this.j,nBytes:this.A})},t.hash=function(n,e){return new t(e).finalize(n)},t}(i.P)},3354:function(n,t,e){e.d(t,{e:function(){return o}});var r=e(5720),i=e(9054),o=function(){function n(t,e){if(Array.isArray(t)||!t)return this._=Array.isArray(t)?t:[],void(this.I="number"==typeof e?e:4*this._.length);if(t instanceof n)return this._=t.words.slice(),void(this.I=t.nSigBytes);var r;try{t instanceof ArrayBuffer?r=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!r)throw new Error("Invalid argument");for(var i=r.byteLength,o=[],u=0;u>>2]|=r[u]<<24-u%4*8;this._=o,this.I=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.I},set:function(n){this.I=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this._},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):r.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this._,t=this.I,e=new Uint8Array(t),r=0;r>>2]>>>24-r%4*8&255;return e},n.prototype.concat=function(n){var t=n.words.slice(),e=n.nSigBytes;if(this.clamp(),this.I%4)for(var r=0;r>>2]>>>24-r%4*8&255;this._[this.I+r>>>2]|=i<<24-(this.I+r)%4*8}else for(r=0;r>>2]=t[r>>>2];return this.I+=e,this},n.prototype.clamp=function(){var n=this.I;this._[n>>>2]&=4294967295<<32-n%4*8,this._.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this._.slice(),this.I)},n.random=function(t){for(var e=[],r=0;r"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,e){e.d(t,{p:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var e=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new r.e(e,t/2)}}},8702:function(n,t,e){e.d(t,{m:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(n){for(var t=n.length,e=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new r.e(e,t)}}},4768:function(n,t,e){e.d(t,{d:function(){return i}});var r=e(8702),i={stringify:function(n){try{return decodeURIComponent(escape(r.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return r.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,e){e.d(t,{M:function(){return i}});var r=e(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,r.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==e.g&&e.g.crypto?function(){return e.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function e(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return n[r](o,o.exports,e),o.exports}e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"N",{value:!0})};var r={};return function(){e.r(r),e.d(r,{SHA384:function(){return u}});var n,t=e(6957),i=e(7491),o=(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=function(n){function e(e){var r=n.call(this,e)||this;return r.i=new t.m([new t.r(3418070365,3238371032),new t.r(1654270250,914150663),new t.r(2438529370,812702999),new t.r(355462360,4144912697),new t.r(1731405415,4290775857),new t.r(2394180231,1750603025),new t.r(3675008525,1694076839),new t.r(1203062813,3204075428)]),r.u=e,e&&void 0!==e.hash&&(r.i=e.hash.clone()),r}return o(e,n),e.prototype.h=function(){this.i=new t.m([new t.r(3418070365,3238371032),new t.r(1654270250,914150663),new t.r(2438529370,812702999),new t.r(355462360,4144912697),new t.r(1731405415,4290775857),new t.r(2394180231,1750603025),new t.r(3675008525,1694076839),new t.r(1203062813,3204075428)])},e.prototype.l=function(){var t=n.prototype.l.call(this);return t.nSigBytes-=16,t},e.prototype.clone=function(){return new e({hash:this.i,blockSize:this.t,data:this.j,nBytes:this.A})},e.hash=function(n,t){return new e(t).finalize(n)},e}(i.SHA512)}(),r}()})); \ No newline at end of file diff --git a/dist/SHA512.js b/dist/SHA512.js index e2b4b77..fb099c9 100644 --- a/dist/SHA512.js +++ b/dist/SHA512.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var e=t();for(var r in n.JsCrypto=n.JsCrypto||{},e)n.JsCrypto[r]=e[r]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,e){e.d(t,{e:function(){return o}});var r=e(5720),i=e(9054),o=function(){function n(t,e){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof e?e:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var r;try{t instanceof ArrayBuffer?r=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!r)throw new Error("Invalid argument");for(var i=r.byteLength,o=[],u=0;u>>2]|=r[u]<<24-u%4*8;this.t=o,this.i=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):r.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,e=new Uint8Array(t),r=0;r>>2]>>>24-r%4*8&255;return e},n.prototype.concat=function(n){var t=n.words.slice(),e=n.nSigBytes;if(this.clamp(),this.i%4)for(var r=0;r>>2]>>>24-r%4*8&255;this.t[this.i+r>>>2]|=i<<24-(this.i+r)%4*8}else for(r=0;r>>2]=t[r>>>2];return this.i+=e,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var e=[],r=0;r"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,e){e.d(t,{p:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var e=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new r.e(e,t/2)}}},8702:function(n,t,e){e.d(t,{m:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(n){for(var t=n.length,e=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new r.e(e,t)}}},4768:function(n,t,e){e.d(t,{d:function(){return i}});var r=e(8702),i={stringify:function(n){try{return decodeURIComponent(escape(r.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return r.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,e){e.d(t,{M:function(){return i}});var r=e(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,r.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==e.g&&e.g.crypto?function(){return e.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function e(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return n[r](o,o.exports,e),o.exports}e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"_",{value:!0})};var r={};return function(){e.r(r),e.d(r,{SHA512:function(){return c}});var n,t=e(1868),i=e(6957),o=(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=[new i.r(1116352408,3609767458),new i.r(1899447441,602891725),new i.r(3049323471,3964484399),new i.r(3921009573,2173295548),new i.r(961987163,4081628472),new i.r(1508970993,3053834265),new i.r(2453635748,2937671579),new i.r(2870763221,3664609560),new i.r(3624381080,2734883394),new i.r(310598401,1164996542),new i.r(607225278,1323610764),new i.r(1426881987,3590304994),new i.r(1925078388,4068182383),new i.r(2162078206,991336113),new i.r(2614888103,633803317),new i.r(3248222580,3479774868),new i.r(3835390401,2666613458),new i.r(4022224774,944711139),new i.r(264347078,2341262773),new i.r(604807628,2007800933),new i.r(770255983,1495990901),new i.r(1249150122,1856431235),new i.r(1555081692,3175218132),new i.r(1996064986,2198950837),new i.r(2554220882,3999719339),new i.r(2821834349,766784016),new i.r(2952996808,2566594879),new i.r(3210313671,3203337956),new i.r(3336571891,1034457026),new i.r(3584528711,2466948901),new i.r(113926993,3758326383),new i.r(338241895,168717936),new i.r(666307205,1188179964),new i.r(773529912,1546045734),new i.r(1294757372,1522805485),new i.r(1396182291,2643833823),new i.r(1695183700,2343527390),new i.r(1986661051,1014477480),new i.r(2177026350,1206759142),new i.r(2456956037,344077627),new i.r(2730485921,1290863460),new i.r(2820302411,3158454273),new i.r(3259730800,3505952657),new i.r(3345764771,106217008),new i.r(3516065817,3606008344),new i.r(3600352804,1432725776),new i.r(4094571909,1467031594),new i.r(275423344,851169720),new i.r(430227734,3100823752),new i.r(506948616,1363258195),new i.r(659060556,3750685593),new i.r(883997877,3785050280),new i.r(958139571,3318307427),new i.r(1322822218,3812723403),new i.r(1537002063,2003034995),new i.r(1747873779,3602036899),new i.r(1955562222,1575990012),new i.r(2024104815,1125592928),new i.r(2227730452,2716904306),new i.r(2361852424,442776044),new i.r(2428436474,593698344),new i.r(2756734187,3733110249),new i.r(3204031479,2999351573),new i.r(3329325298,3815920427),new i.r(3391569614,3928383900),new i.r(3515267271,566280711),new i.r(3940187606,3454069534),new i.r(4118630271,4000239992),new i.r(116418474,1914138554),new i.r(174292421,2731055270),new i.r(289380356,3203993006),new i.r(460393269,320620315),new i.r(685471733,587496836),new i.r(852142971,1086792851),new i.r(1017036298,365543100),new i.r(1126000580,2618297676),new i.r(1288033470,3409855158),new i.r(1501505948,4234509866),new i.r(1607167915,987167468),new i.r(1816402316,1246189591)],f=[];!function(){for(var n=0;n<80;n++)f[n]=new i.r(0,0)}();var c=function(n){function t(t){var e=n.call(this,t)||this;return e.h=32,e.N=new i.m([new i.r(1779033703,4089235720),new i.r(3144134277,2227873595),new i.r(1013904242,4271175723),new i.r(2773480762,1595750129),new i.r(1359893119,2917565137),new i.r(2600822924,725511199),new i.r(528734635,4215389547),new i.r(1541459225,327033209)]),e.v=t,t&&void 0!==t.hash&&(e.N=t.hash.clone()),e}return o(t,n),t.prototype.U=function(){this.N=new i.m([new i.r(1779033703,4089235720),new i.r(3144134277,2227873595),new i.r(1013904242,4271175723),new i.r(2773480762,1595750129),new i.r(1359893119,2917565137),new i.r(2600822924,725511199),new i.r(528734635,4215389547),new i.r(1541459225,327033209)])},t.prototype.I=function(n,t){for(var e=this.N.words,r=e[0],i=e[1],o=e[2],c=e[3],s=e[4],w=e[5],a=e[6],h=e[7],v=r.high,d=r.low,l=i.high,b=i.low,y=o.high,p=o.low,m=c.high,g=c.low,j=s.high,A=s.low,O=w.high,I=w.low,M=a.high,U=a.low,E=h.high,S=h.low,_=v,N=d,x=l,C=b,B=y,F=p,k=m,z=g,T=j,H=A,P=O,R=I,q=M,D=U,G=E,J=S,K=0;K<80;K++){var L=void 0,Q=void 0,V=f[K];if(K<16)Q=V.high=0|n[t+2*K],L=V.low=0|n[t+2*K+1];else{var W=f[K-15],X=W.high,Y=W.low,Z=(X>>>1|Y<<31)^(X>>>8|Y<<24)^X>>>7,$=(Y>>>1|X<<31)^(Y>>>8|X<<24)^(Y>>>7|X<<25),nn=f[K-2],tn=nn.high,en=nn.low,rn=(tn>>>19|en<<13)^(tn<<3|en>>>29)^tn>>>6,on=(en>>>19|tn<<13)^(en<<3|tn>>>29)^(en>>>6|tn<<26),un=f[K-7],fn=un.high,cn=un.low,sn=f[K-16],wn=sn.high,an=sn.low;Q=(Q=(Q=Z+fn+((L=$+cn)>>>0<$>>>0?1:0))+rn+((L+=on)>>>0>>0?1:0))+wn+((L+=an)>>>0>>0?1:0),V.high=Q,V.low=L}var hn=T&P^~T&q,vn=H&R^~H&D,dn=_&x^_&B^x&B,ln=N&C^N&F^C&F,bn=(_>>>28|N<<4)^(_<<30|N>>>2)^(_<<25|N>>>7),yn=(N>>>28|_<<4)^(N<<30|_>>>2)^(N<<25|_>>>7),pn=(T>>>14|H<<18)^(T>>>18|H<<14)^(T<<23|H>>>9),mn=(H>>>14|T<<18)^(H>>>18|T<<14)^(H<<23|T>>>9),gn=u[K],jn=gn.high,An=gn.low,On=J+mn,In=G+pn+(On>>>0>>0?1:0),Mn=yn+ln;G=q,J=D,q=P,D=R,P=T,R=H,T=k+(In=(In=(In=In+hn+((On+=vn)>>>0>>0?1:0))+jn+((On+=An)>>>0>>0?1:0))+Q+((On+=L)>>>0>>0?1:0))+((H=z+On|0)>>>0>>0?1:0)|0,k=B,z=F,B=x,F=C,x=_,C=N,_=In+(bn+dn+(Mn>>>0>>0?1:0))+((N=On+Mn|0)>>>0>>0?1:0)|0}d=r.low=d+N,r.high=v+_+(d>>>0>>0?1:0),b=i.low=b+C,i.high=l+x+(b>>>0>>0?1:0),p=o.low=p+F,o.high=y+B+(p>>>0>>0?1:0),g=c.low=g+z,c.high=m+k+(g>>>0>>0?1:0),A=s.low=A+H,s.high=j+T+(A>>>0>>0?1:0),I=w.low=I+R,w.high=O+P+(I>>>0>>0?1:0),U=a.low=U+D,a.high=M+q+(U>>>0>>0?1:0),S=h.low=S+J,h.high=E+G+(S>>>0>>0?1:0)},t.prototype.S=function(){var n=this.l,t=n.words,e=8*this.j,r=8*n.nSigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(e/4294967296),t[31+(r+128>>>10<<5)]=e,n.nSigBytes=4*t.length,this.O(),this.N.to32()},t.prototype.clone=function(){return new t({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},t.hash=function(n,e){return new t(e).finalize(n)},t}(t.P)}(),r}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var e=t();for(var r in n.JsCrypto=n.JsCrypto||{},e)n.JsCrypto[r]=e[r]}}(this,(function(){return function(){"use strict";var n={3354:function(n,t,e){e.d(t,{e:function(){return o}});var r=e(5720),i=e(9054),o=function(){function n(t,e){if(Array.isArray(t)||!t)return this.t=Array.isArray(t)?t:[],void(this.i="number"==typeof e?e:4*this.t.length);if(t instanceof n)return this.t=t.words.slice(),void(this.i=t.nSigBytes);var r;try{t instanceof ArrayBuffer?r=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!r)throw new Error("Invalid argument");for(var i=r.byteLength,o=[],u=0;u>>2]|=r[u]<<24-u%4*8;this.t=o,this.i=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.i},set:function(n){this.i=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.t},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):r.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.t,t=this.i,e=new Uint8Array(t),r=0;r>>2]>>>24-r%4*8&255;return e},n.prototype.concat=function(n){var t=n.words.slice(),e=n.nSigBytes;if(this.clamp(),this.i%4)for(var r=0;r>>2]>>>24-r%4*8&255;this.t[this.i+r>>>2]|=i<<24-(this.i+r)%4*8}else for(r=0;r>>2]=t[r>>>2];return this.i+=e,this},n.prototype.clamp=function(){var n=this.i;this.t[n>>>2]&=4294967295<<32-n%4*8,this.t.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.t.slice(),this.i)},n.random=function(t){for(var e=[],r=0;r"===n?o>t:">="===n?o>=t:o===t))}},5720:function(n,t,e){e.d(t,{p:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var e=[],i=0;i>>3]|=parseInt(n.substr(i,2),16)<<24-i%8*4;return new r.e(e,t/2)}}},8702:function(n,t,e){e.d(t,{m:function(){return i}});var r=e(3354),i={stringify:function(n){for(var t=n.nSigBytes,e=n.words,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(n){for(var t=n.length,e=[],i=0;i>>2]|=(255&n.charCodeAt(i))<<24-i%4*8;return new r.e(e,t)}}},4768:function(n,t,e){e.d(t,{d:function(){return i}});var r=e(8702),i={stringify:function(n){try{return decodeURIComponent(escape(r.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return r.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,e){e.d(t,{M:function(){return i}});var r=e(1756);var i=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,r.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==e.g&&e.g.crypto?function(){return e.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function e(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return n[r](o,o.exports,e),o.exports}e.d=function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"_",{value:!0})};var r={};return function(){e.r(r),e.d(r,{SHA512:function(){return c}});var n,t=e(1868),i=e(6957),o=(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=[new i.r(1116352408,3609767458),new i.r(1899447441,602891725),new i.r(3049323471,3964484399),new i.r(3921009573,2173295548),new i.r(961987163,4081628472),new i.r(1508970993,3053834265),new i.r(2453635748,2937671579),new i.r(2870763221,3664609560),new i.r(3624381080,2734883394),new i.r(310598401,1164996542),new i.r(607225278,1323610764),new i.r(1426881987,3590304994),new i.r(1925078388,4068182383),new i.r(2162078206,991336113),new i.r(2614888103,633803317),new i.r(3248222580,3479774868),new i.r(3835390401,2666613458),new i.r(4022224774,944711139),new i.r(264347078,2341262773),new i.r(604807628,2007800933),new i.r(770255983,1495990901),new i.r(1249150122,1856431235),new i.r(1555081692,3175218132),new i.r(1996064986,2198950837),new i.r(2554220882,3999719339),new i.r(2821834349,766784016),new i.r(2952996808,2566594879),new i.r(3210313671,3203337956),new i.r(3336571891,1034457026),new i.r(3584528711,2466948901),new i.r(113926993,3758326383),new i.r(338241895,168717936),new i.r(666307205,1188179964),new i.r(773529912,1546045734),new i.r(1294757372,1522805485),new i.r(1396182291,2643833823),new i.r(1695183700,2343527390),new i.r(1986661051,1014477480),new i.r(2177026350,1206759142),new i.r(2456956037,344077627),new i.r(2730485921,1290863460),new i.r(2820302411,3158454273),new i.r(3259730800,3505952657),new i.r(3345764771,106217008),new i.r(3516065817,3606008344),new i.r(3600352804,1432725776),new i.r(4094571909,1467031594),new i.r(275423344,851169720),new i.r(430227734,3100823752),new i.r(506948616,1363258195),new i.r(659060556,3750685593),new i.r(883997877,3785050280),new i.r(958139571,3318307427),new i.r(1322822218,3812723403),new i.r(1537002063,2003034995),new i.r(1747873779,3602036899),new i.r(1955562222,1575990012),new i.r(2024104815,1125592928),new i.r(2227730452,2716904306),new i.r(2361852424,442776044),new i.r(2428436474,593698344),new i.r(2756734187,3733110249),new i.r(3204031479,2999351573),new i.r(3329325298,3815920427),new i.r(3391569614,3928383900),new i.r(3515267271,566280711),new i.r(3940187606,3454069534),new i.r(4118630271,4000239992),new i.r(116418474,1914138554),new i.r(174292421,2731055270),new i.r(289380356,3203993006),new i.r(460393269,320620315),new i.r(685471733,587496836),new i.r(852142971,1086792851),new i.r(1017036298,365543100),new i.r(1126000580,2618297676),new i.r(1288033470,3409855158),new i.r(1501505948,4234509866),new i.r(1607167915,987167468),new i.r(1816402316,1246189591)],f=[];!function(){for(var n=0;n<80;n++)f[n]=new i.r(0,0)}();var c=function(n){function t(t){var e=n.call(this,t)||this;return e.h=32,e.N=new i.m([new i.r(1779033703,4089235720),new i.r(3144134277,2227873595),new i.r(1013904242,4271175723),new i.r(2773480762,1595750129),new i.r(1359893119,2917565137),new i.r(2600822924,725511199),new i.r(528734635,4215389547),new i.r(1541459225,327033209)]),e.v=t,t&&void 0!==t.hash&&(e.N=t.hash.clone()),e}return o(t,n),t.prototype.U=function(){this.N=new i.m([new i.r(1779033703,4089235720),new i.r(3144134277,2227873595),new i.r(1013904242,4271175723),new i.r(2773480762,1595750129),new i.r(1359893119,2917565137),new i.r(2600822924,725511199),new i.r(528734635,4215389547),new i.r(1541459225,327033209)])},t.prototype.I=function(n,t){for(var e=this.N.words,r=e[0],i=e[1],o=e[2],c=e[3],s=e[4],w=e[5],a=e[6],h=e[7],v=r.high,d=r.low,l=i.high,b=i.low,y=o.high,p=o.low,m=c.high,g=c.low,j=s.high,A=s.low,O=w.high,I=w.low,E=a.high,M=a.low,U=h.high,S=h.low,_=v,N=d,x=l,C=b,F=y,B=p,k=m,z=g,H=j,T=A,P=O,R=I,q=E,$=M,D=U,G=S,J=0;J<80;J++){var K=void 0,L=void 0,Q=f[J];if(J<16)L=Q.high=0|n[t+2*J],K=Q.low=0|n[t+2*J+1];else{var V=f[J-15],W=V.high,X=V.low,Y=(W>>>1|X<<31)^(W>>>8|X<<24)^W>>>7,Z=(X>>>1|W<<31)^(X>>>8|W<<24)^(X>>>7|W<<25),nn=f[J-2],tn=nn.high,en=nn.low,rn=(tn>>>19|en<<13)^(tn<<3|en>>>29)^tn>>>6,on=(en>>>19|tn<<13)^(en<<3|tn>>>29)^(en>>>6|tn<<26),un=f[J-7],fn=un.high,cn=un.low,sn=f[J-16],wn=sn.high,an=sn.low;L=(L=(L=Y+fn+((K=Z+cn)>>>0>>0?1:0))+rn+((K+=on)>>>0>>0?1:0))+wn+((K+=an)>>>0>>0?1:0),Q.high=L,Q.low=K}var hn=H&P^~H&q,vn=T&R^~T&$,dn=_&x^_&F^x&F,ln=N&C^N&B^C&B,bn=(_>>>28|N<<4)^(_<<30|N>>>2)^(_<<25|N>>>7),yn=(N>>>28|_<<4)^(N<<30|_>>>2)^(N<<25|_>>>7),pn=(H>>>14|T<<18)^(H>>>18|T<<14)^(H<<23|T>>>9),mn=(T>>>14|H<<18)^(T>>>18|H<<14)^(T<<23|H>>>9),gn=u[J],jn=gn.high,An=gn.low,On=G+mn,In=D+pn+(On>>>0>>0?1:0),En=yn+ln;D=q,G=$,q=P,$=R,P=H,R=T,H=k+(In=(In=(In=In+hn+((On+=vn)>>>0>>0?1:0))+jn+((On+=An)>>>0>>0?1:0))+L+((On+=K)>>>0>>0?1:0))+((T=z+On|0)>>>0>>0?1:0)|0,k=F,z=B,F=x,B=C,x=_,C=N,_=In+(bn+dn+(En>>>0>>0?1:0))+((N=On+En|0)>>>0>>0?1:0)|0}d=r.low=d+N,r.high=v+_+(d>>>0>>0?1:0),b=i.low=b+C,i.high=l+x+(b>>>0>>0?1:0),p=o.low=p+B,o.high=y+F+(p>>>0>>0?1:0),g=c.low=g+z,c.high=m+k+(g>>>0>>0?1:0),A=s.low=A+T,s.high=j+H+(A>>>0>>0?1:0),I=w.low=I+R,w.high=O+P+(I>>>0>>0?1:0),M=a.low=M+$,a.high=E+q+(M>>>0<$>>>0?1:0),S=h.low=S+G,h.high=U+D+(S>>>0>>0?1:0)},t.prototype.S=function(){var n=this.l,t=n.words,e=8*this.j,r=8*n.nSigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(e/4294967296),t[31+(r+128>>>10<<5)]=e,n.nSigBytes=4*t.length,this.O(),this.N.to32()},t.prototype.clone=function(){return new t({hash:this.N,blockSize:this.h,data:this.l,nBytes:this.j})},t.hash=function(n,e){return new t(e).finalize(n)},t}(t.P)}(),r}()})); \ No newline at end of file diff --git a/dist/Word64Array.js b/dist/Word64Array.js index 414a076..85f5163 100644 --- a/dist/Word64Array.js +++ b/dist/Word64Array.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var e in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[e]=r[e]}}(this,(function(){return function(){"use strict";var n={d:function(t,r){for(var e in r)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})}};n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),n.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},n.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"t",{value:!0})};var t={};n.r(t),n.d(t,{Word64:function(){return s},Word64Array:function(){return a}});var r,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",i=(r=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(r)?(r=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(r)&&r):r);var o=function(){if("undefined"!=typeof window){var t=window.crypto||window.msCrypto;if(!t){if(function(n,t){return!1!==i&&(!t||("<"===n?i"===n?i>t:">="===n?i>=t:i===t))}("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return t.getRandomValues(new Uint32Array(1))[0]}}return void 0!==n.g&&n.g.crypto?function(){return n.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}(),u=function(){function n(t,r){if(Array.isArray(t)||!t)return this.i=Array.isArray(t)?t:[],void(this.u="number"==typeof r?r:4*this.i.length);if(t instanceof n)return this.i=t.words.slice(),void(this.u=t.nSigBytes);var e;try{t instanceof ArrayBuffer?e=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!e)throw new Error("Invalid argument");for(var i=e.byteLength,o=[],u=0;u>>2]|=e[u]<<24-u%4*8;this.i=o,this.u=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.u},set:function(n){this.u=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.i},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):f.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.i,t=this.u,r=new Uint8Array(t),e=0;e>>2]>>>24-e%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.u%4)for(var e=0;e>>2]>>>24-e%4*8&255;this.i[this.u+e>>>2]|=i<<24-(this.u+e)%4*8}else for(e=0;e>>2]=t[e>>>2];return this.u+=r,this},n.prototype.clamp=function(){var n=this.u;this.i[n>>>2]&=4294967295<<32-n%4*8,this.i.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.i.slice(),this.u)},n.random=function(t){for(var r=[],e=0;e>>2]>>>24-i%4*8&255;e.push((o>>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new u(r,t/2)}},s=function(){function n(n,t){this.high=n,this.low=t}return n.prototype.clone=function(){return new n(this.high,this.low)},n}(),a=function(){function n(n,t){this.i=n||[],this.u="number"==typeof t?t:8*this.i.length}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.u},set:function(n){this.u=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.i},enumerable:!1,configurable:!0}),n.prototype.to32=function(){for(var n=[],t=0;t"===n?i>t:">="===n?i>=t:i===t))}("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return t.getRandomValues(new Uint32Array(1))[0]}}return void 0!==n.g&&n.g.crypto?function(){return n.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}(),u=function(){function n(t,r){if(Array.isArray(t)||!t)return this.i=Array.isArray(t)?t:[],void(this.u="number"==typeof r?r:4*this.i.length);if(t instanceof n)return this.i=t.words.slice(),void(this.u=t.nSigBytes);var e;try{t instanceof ArrayBuffer?e=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!e)throw new Error("Invalid argument");for(var i=e.byteLength,o=[],u=0;u>>2]|=e[u]<<24-u%4*8;this.i=o,this.u=i}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.u},set:function(n){this.u=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.i},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):f.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.i,t=this.u,r=new Uint8Array(t),e=0;e>>2]>>>24-e%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.u%4)for(var e=0;e>>2]>>>24-e%4*8&255;this.i[this.u+e>>>2]|=i<<24-(this.u+e)%4*8}else for(e=0;e>>2]=t[e>>>2];return this.u+=r,this},n.prototype.clamp=function(){var n=this.u;this.i[n>>>2]&=4294967295<<32-n%4*8,this.i.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.i.slice(),this.u)},n.random=function(t){for(var r=[],e=0;e>>2]>>>24-i%4*8&255;e.push((o>>>4).toString(16)),e.push((15&o).toString(16))}return e.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new u(r,t/2)}},s=function(){function n(n,t){this.high=n,this.low=t}return n.prototype.clone=function(){return new n(this.high,this.low)},n}(),a=function(){function n(n,t){this.i=n||[],this.u="number"==typeof t?t:8*this.i.length}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.u},set:function(n){this.u=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.i},enumerable:!1,configurable:!0}),n.prototype.to32=function(){for(var n=[],t=0;t>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4); diff --git a/dist/index.js b/dist/index.js index c4566d4..8c08d7e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={9691:function(n,t,r){r.d(t,{AES:function(){return _}});var i,e=r(9456),o=r(787),u=r(5693),f=r(9109),c=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return(s=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>8^255&e^99,a[r]=e,h[e]=r;var o=n[r],u=n[o],f=n[u],c=257*n[e]^16843008*e;v[r]=c<<24|c>>>8,w[r]=c<<16|c>>>16,l[r]=c<<8|c>>>24,b[r]=c,c=16843009*f^65537*u^257*o^16843008*r,d[e]=c<<24|c>>>8,y[e]=c<<16|c>>>16,p[e]=c<<8|c>>>24,O[e]=c,r?(r=o^n[n[n[f^o]]],i^=n[n[i]]):r=i=1}}();var j=[0,1,2,4,8,16,32,64,128,27,54],_=function(n){function t(t){var r=n.call(this,t)||this;return r.u=0,r.h=[],r.v=[],r.O=t,r.A(),r}return c(t,n),t.prototype.A=function(){var n;if(!this.u||this.k!==this.H){for(var t=this.k=this.H,r=t.words,i=t.nSigBytes/4,e=4*((this.u=i+6)+1),o=this.h=[],u=0;u6&&u%i==4&&(n=a[n>>>24]<<24|a[n>>>16&255]<<16|a[n>>>8&255]<<8|a[255&n]):(n=a[(n=n<<8|n>>>24)>>>24]<<24|a[n>>>16&255]<<16|a[n>>>8&255]<<8|a[255&n],n^=j[u/i|0]<<24),o[u]=o[u-i]^n);this.v=[];for(var f=0;f>>24]]^y[a[n>>>16&255]]^p[a[n>>>8&255]]^O[a[255&n]]}}},t.prototype.encryptBlock=function(n,t){this.B(n,t,this.h,v,w,l,b,a)},t.prototype.decryptBlock=function(n,t){var r=n[t+1];n[t+1]=n[t+3],n[t+3]=r,this.B(n,t,this.v,d,y,p,O,h),r=n[t+1],n[t+1]=n[t+3],n[t+3]=r},t.prototype.B=function(n,t,r,i,e,o,u,f){for(var c=this.u,s=n[t]^r[0],a=n[t+1]^r[1],h=n[t+2]^r[2],v=n[t+3]^r[3],w=4,l=1;l>>24]^e[a>>>16&255]^o[h>>>8&255]^u[255&v]^r[w++],d=i[a>>>24]^e[h>>>16&255]^o[v>>>8&255]^u[255&s]^r[w++],y=i[h>>>24]^e[v>>>16&255]^o[s>>>8&255]^u[255&a]^r[w++],p=i[v>>>24]^e[s>>>16&255]^o[a>>>8&255]^u[255&h]^r[w++];s=b,a=d,h=y,v=p}var O=(f[s>>>24]<<24|f[a>>>16&255]<<16|f[h>>>8&255]<<8|f[255&v])^r[w++],j=(f[a>>>24]<<24|f[h>>>16&255]<<16|f[v>>>8&255]<<8|f[255&s])^r[w++],_=(f[h>>>24]<<24|f[v>>>16&255]<<16|f[s>>>8&255]<<8|f[255&a])^r[w++],m=(f[v>>>24]<<24|f[s>>>16&255]<<16|f[a>>>8&255]<<8|f[255&h])^r[w++];n[t]=O,n[t+1]=j,n[t+2]=_,n[t+3]=m},t.createEncryptor=function(n,r){return new t(s(s({},r=void 0===r?{}:r),{key:n,transformMode:e.t.ENC_TRANSFORM_MODE}))},t.createDecryptor=function(n,r){return new t(s(s({},r=void 0===r?{}:r),{key:n,transformMode:e.t.DEC_TRANSFORM_MODE}))},t.encrypt=function(n,r,i){if("string"==typeof r)return u.E.encrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){if("string"==typeof r)return u.E.decrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.decrypt(t,n,r,i)},t.keySize=8,t}(o.G)},3967:function(n,t,r){r.d(t,{CBCMAC:function(){return f}});var i=r(4768),e=r(3354),o=r(9691),u=r(3664);function f(n,t,r,f,c,s){var a=s&&s.Cipher?s.Cipher:o.AES,h="string"==typeof r?i.d.parse(r):r,v=f||new e.e([0,0]),w="string"==typeof t?i.d.parse(t):t,l="string"==typeof n?i.d.parse(n):n,b=c||16;return u.K.mac(a,h,v,w,l,b)}},9910:function(n,t,r){r.d(t,{DES:function(){return b}});var i,e=r(787),o=r(9456),u=r(5693),f=r(9109),c=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return(s=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>5]>>>31-i%32&1}for(var e=this.I=[],o=0;o<16;o++){var u=e[o]=[],f=v[o];for(r=0;r<24;r++)u[r/6|0]|=t[(h[r]-1+f)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(h[r+24]-1+f)%28]<<31-r%6;u[0]=u[0]<<1|u[0]>>>31;for(r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}this.U=[];for(r=0;r<16;r++)this.U[r]=e[15-r]},t.prototype.encryptBlock=function(n,t){this.R(n,t,this.I)},t.prototype.decryptBlock=function(n,t){this.R(n,t,this.U)},t.prototype.R=function(n,t,r){this.L=n[t],this.F=n[t+1],this.X(4,252645135),this.X(16,65535),this.Z(2,858993459),this.Z(8,16711935),this.X(1,1431655765);for(var i=0;i<16;i++){for(var e=r[i],o=this.L,u=this.F,f=0,c=0;c<8;c++){var s=(u^e[c])&l[c];f|=w[c][s>>>0]}this.L=u,this.F=o^f}var a=this.L;this.L=this.F,this.F=a,this.X(1,1431655765),this.Z(8,16711935),this.Z(2,858993459),this.X(16,65535),this.X(4,252645135),n[t]=this.L,n[t+1]=this.F},t.prototype.X=function(n,t){var r=(this.L>>>n^this.F)&t;this.F^=r,this.L^=r<>>n^this.L)&t;this.L^=r,this.F^=r<192.");var t=n.slice(0,2),r=n.length<4?n.slice(0,2):n.slice(2,4),i=n.length<6?n.slice(0,2):n.slice(4,6);return[f.DES.createEncryptor(new c.e(t)),f.DES.createEncryptor(new c.e(r)),f.DES.createEncryptor(new c.e(i))]},t.prototype.A=function(){var n=this.J();this.Y=n[0],this.$=n[1],this.nn=n[2]},t.prototype.encryptBlock=function(n,t){this.Y.encryptBlock(n,t),this.$.decryptBlock(n,t),this.nn.encryptBlock(n,t)},t.prototype.decryptBlock=function(n,t){this.nn.decryptBlock(n,t),this.$.encryptBlock(n,t),this.Y.decryptBlock(n,t)},t.createEncryptor=function(n,r){return new t(h(h({},r=void 0===r?{}:r),{key:n,transformMode:u.t.ENC_TRANSFORM_MODE}))},t.createDecryptor=function(n,r){return new t(h(h({},r=void 0===r?{}:r),{key:n,transformMode:u.t.DEC_TRANSFORM_MODE}))},t.encrypt=function(n,r,i){return"string"==typeof r?s.E.encrypt(t,n,r,i):e.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?s.E.decrypt(t,n,r,i):e.D.decrypt(t,n,r,i)},t.keySize=6,t.ivSize=2,t}(o.G)},7753:function(n,t,r){r.d(t,{GMAC:function(){return f}});var i=r(4768),e=r(3354),o=r(9691),u=r(5607);function f(n,t,r,f,c){var s="string"==typeof n?i.d.parse(n):n,a=r||new e.e([0,0,0,0]),h=c&&c.Cipher?c.Cipher:o.AES,v="string"==typeof t?i.d.parse(t):t,w=f||16;return u.V.mac(h,v,a,s,void 0,w)}},6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.tn=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.rn=t.clone(),u=this.en=t.clone(),f=o.words,c=u.words,s=0;s>>32-o)+t}function s(n,t,r,i,e,o,u){var f=n+(t&i|r&~i)+e+u;return(f<>>32-o)+t}function a(n,t,r,i,e,o,u){var f=n+(t^r^i)+e+u;return(f<>>32-o)+t}function h(n,t,r,i,e,o,u){var f=n+(r^(t|~i))+e+u;return(f<>>32-o)+t}!function(){for(var n=0;n<64;n++)f[n]=4294967296*Math.abs(Math.sin(n+1))|0}();var v=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new e.e([1732584193,4023233417,2562383102,271733878]),t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new e.e([1732584193,4023233417,2562383102,271733878])},t.prototype.un=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this.on.words,u=n[t],v=n[t+1],w=n[t+2],l=n[t+3],b=n[t+4],d=n[t+5],y=n[t+6],p=n[t+7],O=n[t+8],j=n[t+9],_=n[t+10],m=n[t+11],A=n[t+12],g=n[t+13],E=n[t+14],S=n[t+15],M=o[0],k=o[1],H=o[2],C=o[3];M=c(M,k,H,C,u,7,f[0]),C=c(C,M,k,H,v,12,f[1]),H=c(H,C,M,k,w,17,f[2]),k=c(k,H,C,M,l,22,f[3]),M=c(M,k,H,C,b,7,f[4]),C=c(C,M,k,H,d,12,f[5]),H=c(H,C,M,k,y,17,f[6]),k=c(k,H,C,M,p,22,f[7]),M=c(M,k,H,C,O,7,f[8]),C=c(C,M,k,H,j,12,f[9]),H=c(H,C,M,k,_,17,f[10]),k=c(k,H,C,M,m,22,f[11]),M=c(M,k,H,C,A,7,f[12]),C=c(C,M,k,H,g,12,f[13]),H=c(H,C,M,k,E,17,f[14]),M=s(M,k=c(k,H,C,M,S,22,f[15]),H,C,v,5,f[16]),C=s(C,M,k,H,y,9,f[17]),H=s(H,C,M,k,m,14,f[18]),k=s(k,H,C,M,u,20,f[19]),M=s(M,k,H,C,d,5,f[20]),C=s(C,M,k,H,_,9,f[21]),H=s(H,C,M,k,S,14,f[22]),k=s(k,H,C,M,b,20,f[23]),M=s(M,k,H,C,j,5,f[24]),C=s(C,M,k,H,E,9,f[25]),H=s(H,C,M,k,l,14,f[26]),k=s(k,H,C,M,O,20,f[27]),M=s(M,k,H,C,g,5,f[28]),C=s(C,M,k,H,w,9,f[29]),H=s(H,C,M,k,p,14,f[30]),M=a(M,k=s(k,H,C,M,A,20,f[31]),H,C,d,4,f[32]),C=a(C,M,k,H,O,11,f[33]),H=a(H,C,M,k,m,16,f[34]),k=a(k,H,C,M,E,23,f[35]),M=a(M,k,H,C,v,4,f[36]),C=a(C,M,k,H,b,11,f[37]),H=a(H,C,M,k,p,16,f[38]),k=a(k,H,C,M,_,23,f[39]),M=a(M,k,H,C,g,4,f[40]),C=a(C,M,k,H,u,11,f[41]),H=a(H,C,M,k,l,16,f[42]),k=a(k,H,C,M,y,23,f[43]),M=a(M,k,H,C,j,4,f[44]),C=a(C,M,k,H,A,11,f[45]),H=a(H,C,M,k,S,16,f[46]),M=h(M,k=a(k,H,C,M,w,23,f[47]),H,C,u,6,f[48]),C=h(C,M,k,H,p,10,f[49]),H=h(H,C,M,k,E,15,f[50]),k=h(k,H,C,M,d,21,f[51]),M=h(M,k,H,C,A,6,f[52]),C=h(C,M,k,H,l,10,f[53]),H=h(H,C,M,k,_,15,f[54]),k=h(k,H,C,M,v,21,f[55]),M=h(M,k,H,C,O,6,f[56]),C=h(C,M,k,H,S,10,f[57]),H=h(H,C,M,k,y,15,f[58]),k=h(k,H,C,M,g,21,f[59]),M=h(M,k,H,C,b,6,f[60]),C=h(C,M,k,H,m,10,f[61]),H=h(H,C,M,k,w,15,f[62]),k=h(k,H,C,M,j,21,f[63]),o[0]=o[0]+M|0,o[1]=o[1]+k|0,o[2]=o[2]+H|0,o[3]=o[3]+C|0},t.prototype.fn=function(){var n=this.cn,t=n.words,r=8*this.sn,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32;var e=Math.floor(r/4294967296),o=r;t[15+(i+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n.nSigBytes=4*(t.length+1),this.an();for(var u=this.on,f=u.words,c=0;c<4;c++){var s=f[c];f[c]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return u},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n){return(new t).finalize(n)},t}(o.P)},4615:function(n,t,r){r.d(t,{RC4:function(){return s}});var i,e=r(30),o=r(5693),u=r(9109),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(){return(c=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>2]>>>24-o%4*8&255;e=(e+this.S[i]+u)%256;var f=this.S[i];this.S[i]=this.S[e],this.S[e]=f}this.i=this.j=0},t.prototype.un=function(n,t){n[t]^=this.generateKeyStreamWord()},t.prototype.generateKeyStreamWord=function(){for(var n=this.S,t=this.i,r=this.j,i=0,e=0;e<4;e++){r=(r+n[t=(t+1)%256])%256;var o=n[t];n[t]=n[r],n[r]=o,i|=n[(n[t]+n[r])%256]<<24-8*e}return this.i=t,this.j=r,i},t.createEncryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?o.E.encrypt(t,n,r,i):u.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?o.E.decrypt(t,n,r,i):u.D.decrypt(t,n,r,i)},t.ivSize=0,t.keySize=8,t}(e.q)},9639:function(n,t,r){r.d(t,{RC4Drop:function(){return s}});var i,e=r(5693),o=r(9109),u=r(4615),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(){return(c=Object.assign||function(n){for(var t,r=1,i=arguments.length;r0;t--)this.generateKeyStreamWord()},t.createEncryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?e.E.encrypt(t,n,r,i):o.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?e.E.decrypt(t,n,r,i):o.D.decrypt(t,n,r,i)},t}(u.RC4)},7104:function(n,t,r){r.d(t,{RIPEMD160:function(){return O}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=new o.e([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]),c=new o.e([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]),s=new o.e([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]),a=new o.e([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]),h=new o.e([0,1518500249,1859775393,2400959708,2840853838]),v=new o.e([1352829926,1548603684,1836072691,2053994217,0]);function w(n,t,r){return n^t^r}function l(n,t,r){return n&t|~n&r}function b(n,t,r){return(n|~t)^r}function d(n,t,r){return n&r|t&~r}function y(n,t,r){return n^(t|~r)}function p(n,t){return n<>>32-t}var O=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new o.e([1732584193,4023233417,2562383102,271733878,3285377520]),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new o.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.un=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o,u,O,j,_,m,A,g,E,S,M,k=this.on.words,H=h.words,C=v.words,B=f.words,N=c.words,z=s.words,I=a.words;m=o=k[0],A=u=k[1],g=O=k[2],E=j=k[3],S=_=k[4];for(r=0;r<80;r+=1)M=o+n[t+B[r]]|0,M+=r<16?w(u,O,j)+H[0]:r<32?l(u,O,j)+H[1]:r<48?b(u,O,j)+H[2]:r<64?d(u,O,j)+H[3]:y(u,O,j)+H[4],M=(M=p(M|=0,z[r]))+_|0,o=_,_=j,j=p(O,10),O=u,u=M,M=m+n[t+N[r]]|0,M+=r<16?y(A,g,E)+C[0]:r<32?d(A,g,E)+C[1]:r<48?b(A,g,E)+C[2]:r<64?l(A,g,E)+C[3]:w(A,g,E)+C[4],M=(M=p(M|=0,I[r]))+S|0,m=S,S=E,E=p(g,10),g=A,A=M;M=k[1]+O+E|0,k[1]=k[2]+j+S|0,k[2]=k[3]+_+m|0,k[3]=k[4]+o+A|0,k[4]=k[0]+u+g|0,k[0]=M},t.prototype.fn=function(){var n=this.cn,t=n.words,r=8*this.sn,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n.nSigBytes=4*(t.length+1),this.an();for(var e=this.on,o=e.words,u=0;u<5;u++){var f=o[u];o[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return e},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},5187:function(n,t,r){r.d(t,{Rabbit:function(){return s}});var i,e=r(30),o=r(5693),u=r(9109),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(){return(c=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>24)|4278255360&(n[r]<<24|n[r]>>>8);var i=this.hn=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],e=this.vn=[n[2]<<16|n[2]>>>16,4294901760&n[0]|65535&n[1],n[3]<<16|n[3]>>>16,4294901760&n[1]|65535&n[2],n[0]<<16|n[0]>>>16,4294901760&n[2]|65535&n[3],n[1]<<16|n[1]>>>16,4294901760&n[3]|65535&n[0]];this.wn=0;for(r=0;r<4;r++)this.nextState();for(r=0;r<8;r++)e[r]^=i[r+4&7];if(t){var o=t.words,u=o[0],f=o[1],c=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),s=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),a=c>>>16|4294901760&s,h=s<<16|65535&c;e[0]^=c,e[1]^=a,e[2]^=s,e[3]^=h,e[4]^=c,e[5]^=a,e[6]^=s,e[7]^=h;for(r=0;r<4;r++)this.nextState()}},t.prototype.un=function(n,t){var r=this.hn;this.nextState(),this.S[0]=r[0]^r[5]>>>16^r[3]<<16,this.S[1]=r[2]^r[7]>>>16^r[5]<<16,this.S[2]=r[4]^r[1]>>>16^r[7]<<16,this.S[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)this.S[i]=16711935&(this.S[i]<<8|this.S[i]>>>24)|4278255360&(this.S[i]<<24|this.S[i]>>>8),n[t+i]^=this.S[i]},t.prototype.nextState=function(){for(var n=this.hn,t=this.vn,r=0;r<8;r++)this.C[r]=t[r];t[0]=t[0]+1295307597+this.wn|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this.wn=t[7]>>>0>>0?1:0;for(r=0;r<8;r++){var i=n[r]+t[r],e=65535&i,o=i>>>16,u=((e*e>>>17)+e*o>>>15)+o*o,f=((4294901760&i)*i|0)+((65535&i)*i|0);this.G[r]=u^f}var c=this.G;n[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,n[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,n[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,n[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,n[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,n[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,n[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,n[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0},t.createEncryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?o.E.encrypt(t,n,r,i):u.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?o.E.decrypt(t,n,r,i):u.D.decrypt(t,n,r,i)},t.ivSize=4,t}(e.q)},3173:function(n,t,r){r.d(t,{SHA1:function(){return c}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[],c=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new o.e([1732584193,4023233417,2562383102,271733878,3285377520]),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new o.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.un=function(n,t){for(var r=this.on.words,i=r[0],e=r[1],o=r[2],u=r[3],c=r[4],s=0;s<80;s++){if(s<16)f[s]=0|n[t+s];else{var a=f[s-3]^f[s-8]^f[s-14]^f[s-16];f[s]=a<<1|a>>>31}var h=(i<<5|i>>>27)+c+f[s];h+=s<20?1518500249+(e&o|~e&u):s<40?1859775393+(e^o^u):s<60?(e&o|e&u|o&u)-1894007588:(e^o^u)-899497514,c=u,u=o,o=e<<30|e>>>2,e=i,i=h}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+c|0},t.prototype.fn=function(){var n=this.cn.words,t=8*this.sn,r=8*this.cn.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.cn.nSigBytes=4*n.length,this.an(),this.on},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},766:function(n,t,r){r.d(t,{SHA224:function(){return f}});var i,e=r(3354),o=r(5561),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new e.e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new e.e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},t.prototype.fn=function(){var t=n.prototype.fn.call(this);return t.nSigBytes-=4,t},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(o.SHA256)},5561:function(n,t,r){r.d(t,{SHA256:function(){return v}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[],c=[];function s(n){for(var t=Math.sqrt(n),r=2;r<=t;r++)if(!(n%r))return!1;return!0}function a(n){return 4294967296*(n-(0|n))|0}!function(){for(var n=2,t=0;t<64;)s(n)&&(t<8&&(f[t]=a(Math.pow(n,.5))),c[t]=a(Math.pow(n,1/3)),t++),n++}();var h=[],v=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new o.e(f.slice(0)),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new o.e(f.slice(0))},t.prototype.un=function(n,t){for(var r=this.on.words,i=r[0],e=r[1],o=r[2],u=r[3],f=r[4],s=r[5],a=r[6],v=r[7],w=0;w<64;w++){if(w<16)h[w]=0|n[t+w];else{var l=h[w-15],b=(l<<25|l>>>7)^(l<<14|l>>>18)^l>>>3,d=h[w-2],y=(d<<15|d>>>17)^(d<<13|d>>>19)^d>>>10;h[w]=b+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,O=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(O+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.fn=function(){var n=this.cn.words,t=8*this.sn,r=8*this.cn.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.cn.nSigBytes=4*n.length,this.an(),this.on},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3408:function(n,t,r){r.d(t,{SHA3:function(){return v}});var i,e=r(6957),o=r(1868),u=r(3354),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=[],s=[],a=[];!function(){for(var n=1,t=0,r=0;r<24;r++){c[n+5*t]=(r+1)*(r+2)/2%64;var i=(2*n+3*t)%5;n=t%5,t=i}for(var o=0;o<5;o++)for(var u=0;u<5;u++)s[o+5*u]=u+(2*o+3*u)%5*5;for(var f=1,h=0;h<24;h++){for(var v=0,w=0,l=0;l<7;l++){if(1&f){var b=(1<>>24)|4278255360&(o<<24|o>>>8),u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),r[e].high^=u,r[e].low^=o}for(var f=0;f<24;f++){for(var v=0;v<5;v++){for(var w=0,l=0,b=0;b<5;b++){w^=(k=r[v+5*b]).high,l^=k.low}var d=h[v];d.high=w,d.low=l}for(v=0;v<5;v++){var y=h[(v+4)%5],p=h[(v+1)%5],O=p.high,j=p.low;for(w=y.high^(O<<1|j>>>31),l=y.low^(j<<1|O>>>31),b=0;b<5;b++){(k=r[v+5*b]).high^=w,k.low^=l}}for(var _=1;_<25;_++){w=void 0,l=void 0;var m=r[_].high,A=r[_].low,g=c[_];g<32?(w=m<>>32-g,l=A<>>32-g):(w=A<>>64-g,l=m<>>64-g);var E=h[s[_]];E.high=w,E.low=l}var S=h[0],M=r[0];S.high=M.high,S.low=M.low;for(v=0;v<5;v++)for(b=0;b<5;b++){var k=r[_=v+5*b],H=h[_],C=h[(v+1)%5+5*b],B=h[(v+2)%5+5*b];k.high=H.high^~C.high&B.high,k.low=H.low^~C.low&B.low}var N=r[0],z=a[f];N.high^=z.high,N.low^=z.low}},t.prototype.fn=function(){var n=this.cn,t=n.words,r=8*n.nSigBytes,i=32*this.blockSize;t[r>>>5]|=1<<24-r%32,t[(Math.ceil((r+1)/i)*i>>>5)-1]|=128,n.nSigBytes=4*t.length,this.an();for(var e=this.bn,o=this.dn/8,f=o/8,c=[],s=0;s>>24)|4278255360&(h<<24|h>>>8),v=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),c.push(v),c.push(h)}return new u.e(c,o)},t.prototype.clone=function(){return new t({outputLength:this.dn,state:this.bn,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(o.P)},6324:function(n,t,r){r.d(t,{SHA384:function(){return f}});var i,e=r(6957),o=r(7491),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new e.m([new e.r(3418070365,3238371032),new e.r(1654270250,914150663),new e.r(2438529370,812702999),new e.r(355462360,4144912697),new e.r(1731405415,4290775857),new e.r(2394180231,1750603025),new e.r(3675008525,1694076839),new e.r(1203062813,3204075428)]),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new e.m([new e.r(3418070365,3238371032),new e.r(1654270250,914150663),new e.r(2438529370,812702999),new e.r(355462360,4144912697),new e.r(1731405415,4290775857),new e.r(2394180231,1750603025),new e.r(3675008525,1694076839),new e.r(1203062813,3204075428)])},t.prototype.fn=function(){var t=n.prototype.fn.call(this);return t.nSigBytes-=16,t},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(o.SHA512)},7491:function(n,t,r){r.d(t,{SHA512:function(){return s}});var i,e=r(1868),o=r(6957),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[new o.r(1116352408,3609767458),new o.r(1899447441,602891725),new o.r(3049323471,3964484399),new o.r(3921009573,2173295548),new o.r(961987163,4081628472),new o.r(1508970993,3053834265),new o.r(2453635748,2937671579),new o.r(2870763221,3664609560),new o.r(3624381080,2734883394),new o.r(310598401,1164996542),new o.r(607225278,1323610764),new o.r(1426881987,3590304994),new o.r(1925078388,4068182383),new o.r(2162078206,991336113),new o.r(2614888103,633803317),new o.r(3248222580,3479774868),new o.r(3835390401,2666613458),new o.r(4022224774,944711139),new o.r(264347078,2341262773),new o.r(604807628,2007800933),new o.r(770255983,1495990901),new o.r(1249150122,1856431235),new o.r(1555081692,3175218132),new o.r(1996064986,2198950837),new o.r(2554220882,3999719339),new o.r(2821834349,766784016),new o.r(2952996808,2566594879),new o.r(3210313671,3203337956),new o.r(3336571891,1034457026),new o.r(3584528711,2466948901),new o.r(113926993,3758326383),new o.r(338241895,168717936),new o.r(666307205,1188179964),new o.r(773529912,1546045734),new o.r(1294757372,1522805485),new o.r(1396182291,2643833823),new o.r(1695183700,2343527390),new o.r(1986661051,1014477480),new o.r(2177026350,1206759142),new o.r(2456956037,344077627),new o.r(2730485921,1290863460),new o.r(2820302411,3158454273),new o.r(3259730800,3505952657),new o.r(3345764771,106217008),new o.r(3516065817,3606008344),new o.r(3600352804,1432725776),new o.r(4094571909,1467031594),new o.r(275423344,851169720),new o.r(430227734,3100823752),new o.r(506948616,1363258195),new o.r(659060556,3750685593),new o.r(883997877,3785050280),new o.r(958139571,3318307427),new o.r(1322822218,3812723403),new o.r(1537002063,2003034995),new o.r(1747873779,3602036899),new o.r(1955562222,1575990012),new o.r(2024104815,1125592928),new o.r(2227730452,2716904306),new o.r(2361852424,442776044),new o.r(2428436474,593698344),new o.r(2756734187,3733110249),new o.r(3204031479,2999351573),new o.r(3329325298,3815920427),new o.r(3391569614,3928383900),new o.r(3515267271,566280711),new o.r(3940187606,3454069534),new o.r(4118630271,4000239992),new o.r(116418474,1914138554),new o.r(174292421,2731055270),new o.r(289380356,3203993006),new o.r(460393269,320620315),new o.r(685471733,587496836),new o.r(852142971,1086792851),new o.r(1017036298,365543100),new o.r(1126000580,2618297676),new o.r(1288033470,3409855158),new o.r(1501505948,4234509866),new o.r(1607167915,987167468),new o.r(1816402316,1246189591)],c=[];!function(){for(var n=0;n<80;n++)c[n]=new o.r(0,0)}();var s=function(n){function t(t){var r=n.call(this,t)||this;return r.N=32,r.on=new o.m([new o.r(1779033703,4089235720),new o.r(3144134277,2227873595),new o.r(1013904242,4271175723),new o.r(2773480762,1595750129),new o.r(1359893119,2917565137),new o.r(2600822924,725511199),new o.r(528734635,4215389547),new o.r(1541459225,327033209)]),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new o.m([new o.r(1779033703,4089235720),new o.r(3144134277,2227873595),new o.r(1013904242,4271175723),new o.r(2773480762,1595750129),new o.r(1359893119,2917565137),new o.r(2600822924,725511199),new o.r(528734635,4215389547),new o.r(1541459225,327033209)])},t.prototype.un=function(n,t){for(var r=this.on.words,i=r[0],e=r[1],o=r[2],u=r[3],s=r[4],a=r[5],h=r[6],v=r[7],w=i.high,l=i.low,b=e.high,d=e.low,y=o.high,p=o.low,O=u.high,j=u.low,_=s.high,m=s.low,A=a.high,g=a.low,E=h.high,S=h.low,M=v.high,k=v.low,H=w,C=l,B=b,N=d,z=y,I=p,D=O,U=j,L=_,F=m,x=A,P=g,R=E,T=S,K=M,W=k,G=0;G<80;G++){var q=void 0,Q=void 0,X=c[G];if(G<16)Q=X.high=0|n[t+2*G],q=X.low=0|n[t+2*G+1];else{var V=c[G-15],Z=V.high,J=V.low,Y=(Z>>>1|J<<31)^(Z>>>8|J<<24)^Z>>>7,$=(J>>>1|Z<<31)^(J>>>8|Z<<24)^(J>>>7|Z<<25),nn=c[G-2],tn=nn.high,rn=nn.low,en=(tn>>>19|rn<<13)^(tn<<3|rn>>>29)^tn>>>6,on=(rn>>>19|tn<<13)^(rn<<3|tn>>>29)^(rn>>>6|tn<<26),un=c[G-7],fn=un.high,cn=un.low,sn=c[G-16],an=sn.high,hn=sn.low;Q=(Q=(Q=Y+fn+((q=$+cn)>>>0<$>>>0?1:0))+en+((q+=on)>>>0>>0?1:0))+an+((q+=hn)>>>0>>0?1:0),X.high=Q,X.low=q}var vn=L&x^~L&R,wn=F&P^~F&T,ln=H&B^H&z^B&z,bn=C&N^C&I^N&I,dn=(H>>>28|C<<4)^(H<<30|C>>>2)^(H<<25|C>>>7),yn=(C>>>28|H<<4)^(C<<30|H>>>2)^(C<<25|H>>>7),pn=(L>>>14|F<<18)^(L>>>18|F<<14)^(L<<23|F>>>9),On=(F>>>14|L<<18)^(F>>>18|L<<14)^(F<<23|L>>>9),jn=f[G],_n=jn.high,mn=jn.low,An=W+On,gn=K+pn+(An>>>0>>0?1:0),En=yn+bn;K=R,W=T,R=x,T=P,x=L,P=F,L=D+(gn=(gn=(gn=gn+vn+((An+=wn)>>>0>>0?1:0))+_n+((An+=mn)>>>0>>0?1:0))+Q+((An+=q)>>>0>>0?1:0))+((F=U+An|0)>>>0>>0?1:0)|0,D=z,U=I,z=B,I=N,B=H,N=C,H=gn+(dn+ln+(En>>>0>>0?1:0))+((C=An+En|0)>>>0>>0?1:0)|0}l=i.low=l+C,i.high=w+H+(l>>>0>>0?1:0),d=e.low=d+N,e.high=b+B+(d>>>0>>0?1:0),p=o.low=p+I,o.high=y+z+(p>>>0>>0?1:0),j=u.low=j+U,u.high=O+D+(j>>>0>>0?1:0),m=s.low=m+F,s.high=_+L+(m>>>0>>0?1:0),g=a.low=g+P,a.high=A+x+(g>>>0

>>0?1:0),S=h.low=S+T,h.high=E+R+(S>>>0>>0?1:0),k=v.low=k+W,v.high=M+K+(k>>>0>>0?1:0)},t.prototype.fn=function(){var n=this.cn,t=n.words,r=8*this.sn,i=8*n.nSigBytes;return t[i>>>5]|=128<<24-i%32,t[30+(i+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(i+128>>>10<<5)]=r,n.nSigBytes=4*t.length,this.an(),this.on.to32()},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.yn=Array.isArray(t)?t:[],void(this.pn="number"==typeof r?r:4*this.yn.length);if(t instanceof n)return this.yn=t.words.slice(),void(this.pn=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.yn=o,this.pn=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.pn},set:function(n){this.pn=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.yn},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.yn,t=this.pn,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.pn%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.yn[this.pn+i>>>2]|=e<<24-(this.pn+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.pn+=r,this},n.prototype.clamp=function(){var n=this.pn;this.yn[n>>>2]&=4294967295<<32-n%4*8,this.yn.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.yn.slice(),this.pn)},n.random=function(t){for(var r=[],i=0;i0&&e.push(0),n.concat(new i.e(e,r))}}function o(n,t){return new i.e(n.words.slice(),t)}function u(n,t){for(var r=n.nSigBytes-t,e=[],o=0;o>>2,f=r+o,c=f>>>2,s=n.words[c]>>>24-f%4*8&255;e[u]=0|e[u]|s<<24-o%4*8}var a=new i.e(e,t);return a.clamp(),a}},7919:function(n,t,r){r.d(t,{l:function(){return e}});var i=r(3354);var e={pad:function(n,t){for(var r=4*t,e=r-n.nSigBytes%r,o=e<<24|e<<16|e<<8|e,u=[],f=0;f>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},2688:function(n,t,r){r.d(t,{Base64:function(){return o.D},EvpKDF:function(){return O},Hex:function(){return c.p},Latin1:function(){return f.m},OpenSSLKDF:function(){return l.s},PBKDF2:function(){return b.E},Utf16:function(){return w},Utf16BE:function(){return s},Utf16LE:function(){return v},Utf8:function(){return u.d},Word32Array:function(){return i.e},Word64:function(){return e.r},Word64Array:function(){return e.m}});r(9054);var i=r(3354),e=r(6957),o=(r(1756),r(1773)),u=r(4768),f=r(8702),c=r(5720),s={stringify:function(n){for(var t=n.words,r=n.nSigBytes,i=[],e=0;e>>2]>>>16-e%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>1]|=n.charCodeAt(e)<<16-e%2*16;return new i.e(r,2*t)}};function a(n){return n<<8&4278255360|n>>>8&16711935}var h,v={stringify:function(n){for(var t=n.words,r=n.nSigBytes,i=[],e=0;e>>2]>>>16-e%4*8&65535);i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>1]|=a(n.charCodeAt(e)<<16-e%2*16);return new i.e(r,2*t)}},w=s,l=r(2214),b=r(7008),d=r(670),y=r(9541),p=(h=function(n,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}h(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),O=function(n){function t(t){var r=n.call(this,t)||this;return r.Sn=4,r.Mn=d.MD5,r.kn=1,t&&(r.Sn=void 0!==t.keySize?t.keySize:r.Sn,r.Mn=void 0!==t.Hasher?t.Hasher:r.Mn,r.kn=void 0!==t.iterations?t.iterations:r.kn),r}return p(t,n),t.prototype.compute=function(n,t){for(var r,e=new this.Mn,o=new i.e,u=o.words,f=this.Sn,c=this.kn;u.length13||e.nSigBytes<7))throw new Error("Byte size of iv must be between 7 and 13");return r.Nn=e||new o.e([0,0],8),r.zn=15-r.Nn.nSigBytes,r}return f(t,n),t.getB0=function(n,t,r,i){if(r.nSigBytes+i.nSigBytes!==15)throw new Error("LEN(Q)+LEN(N) must be 15");var e=255&(0|(n?1:0)<<6|(t-2)/2<<3|r.nSigBytes-1),u=i.clone().concat(r);return new o.e([e<<24],1).concat(u)},t.formatAssociatedDataAndPayload=function(n,t){var r,i=n.nSigBytes;if(0===i)r=new o.e([0],0);else if(i4?(e.concat(new o.e([0],n%4)),e.concat(new o.e([r],4))):e.concat(new o.e([r<<32-8*n],n)):e.concat(new o.e([r],4)),i.concat(t).concat(e)},t.mac=function(n,r,i,e,f,c){var s=new n({key:r,iv:i});if(4!==s.blockSize)throw new Error("In CCM, cipher block size must be 128bit");if(i&&(i.nSigBytes>13||i.nSigBytes<7))throw new Error("Byte size of iv must be between 7 and 13");var a=i||new o.e([0,0],8),h=(null==e?void 0:e.clone())||new o.e,v=h.nSigBytes,w=(null==f?void 0:f.clone())||new o.e,l=w.nSigBytes;if(l>>>0>4294967295)throw new Error("Byte length of Payload(plainText) larger than 2^32-1 (4,294,967,295byte) is not supported at this time.");var b=15-a.nSigBytes,d=(0,u.ur)(new o.e([0,l],8),b),y=c||16,p=t.getB0(Boolean(v),y,d,a),O=t.formatAssociatedDataAndPayload(h,w),j=p.words.slice();s.encryptBlock(j,0);for(var _=O.nSigBytes/16,m=O.words,A=j,g=0;g<_;g++){var E=[m[4*g]^A[0],m[4*g+1]^A[1],m[4*g+2]^A[2],m[4*g+3]^A[3]];s.encryptBlock(E,0),A=E}var S=new o.e(A,y),M=t.genCtr(b,a,0);s.encryptBlock(M.words,0);for(g=0;g<4;g++)S.words[g]^=M.words[g];return S.clamp(),S},t.combineCipherTextAndAuthTag=function(n,t){return n.clone().concat(t)},t.splitCipherTextAndAuthTag=function(n,t){var r=t||16;return{cipherText:(0,u.z6)(n,n.nSigBytes-r),authTag:(0,u.ur)(n,r)}},t.createEncryptor=function(n){return new t.Encryptor(n)},t.createDecryptor=function(n){return new t.Decryptor(n)},t.Encryptor=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return f(r,n),r.prototype.processBlock=function(n,r){var i=this.Hn,e=i.blockSize,o=t.genCtr(this.zn,this.Nn,this.Bn);i.encryptBlock(o.words,0);for(var u=0;u0?4-r.length%4:0,o=r.slice(),u=0;u>>0,i=r+1>>>0>>0,o=e+1>>>0>>5]>>>31-o%32&1)>0&&(i[0]=i[0]^e[0],i[1]=i[1]^e[1],i[2]=i[2]^e[2],i[3]=i[3]^e[3]);var u=(1&e[3])>>>0,f=(1&e[0])>>>0,c=(1&e[1])>>>0,s=(1&e[2])>>>0;e[0]=e[0]>>>1,e[1]=e[1]>>>1|(f?2147483648:0),e[2]=e[2]>>>1|(c?2147483648:0),e[3]=e[3]>>>1|(s?2147483648:0),u>0&&(e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3])}return i},t.GHASH=function(n,r){if(n.length%4!=0)throw new Error("Length of 32bit word array 'H' must be multiple of 4(128bit)");if(r.length%4!=0)throw new Error("Length of 32bit word array 'X' must be multiple of 4(128bit)");for(var i=r.length,e=[0,0,0,0],o=0;o0){var A=e[4*c+O]<<32-8*m^f[c][O];y.push(A),p+=m}var g=new o.e(y,p);a.concat(g)}}return a.nSigBytes=i.nSigBytes,a.clamp(),a},t.mac=function(n,r,i,e,f,c){var s=new n({key:r,iv:i}),a=[0,0,0,0];s.encryptBlock(a,0);var h=t.getJ0(a,i.words),v=(null==e?void 0:e.clone())||new o.e,w=[0,8*v.nSigBytes],l=(null==f?void 0:f.clone())||new o.e,b=[0,8*l.nSigBytes],d=c||16;(0,u.I4)(v),(0,u.I4)(l);var y=v.words.concat(l.words).concat(w).concat(b),p=t.GHASH(a,y),O=t.GCTR(s,h,new o.e(p));return(0,u.z6)(O,d)},t.createEncryptor=function(n){return new t.Encryptor(n)},t.createDecryptor=function(n){return new t.Decryptor(n)},t.Encryptor=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return f(r,n),r.prototype.processBlock=function(n,r){var i=this.Hn.blockSize;this.Un=t.inc32(this.Un);for(var e=new o.e(n.slice(r,r+i)),u=t.GCTR(this.Hn,this.Un,e),f=0;f>>2]|=e<<24-o%4*8,n.nSigBytes+=e},unpad:function(n){var t=255&n.words[n.nSigBytes-1>>>2];n.nSigBytes-=t}},K=r(3354);var W={pad:function(n,t){var r=4*t,i=r-n.nSigBytes%r;n.concat(K.e.random(i-1)).concat(new K.e([i<<24],1))},unpad:function(n){var t=255&n.words[n.nSigBytes-1>>>2];n.nSigBytes-=t}};var G={pad:function(n,t){var r=4*t;n.clamp(),n.nSigBytes+=r-(n.nSigBytes%r||r)},unpad:function(n){for(var t=n.words,r=n.nSigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){n.nSigBytes=r+1;break}}};var q={pad:function(n,t){n.concat(new K.e([2147483648],1)),G.pad(n,t)},unpad:function(n){G.unpad(n),n.nSigBytes-=1}},Q=r(7919);var X={pad:function(n,t){},unpad:function(n){}},V=r(1232),Z={CBC:C.n,CFB:z,CTR:D,ECB:L,OFB:x,GCM:P.V,CCM:R.K},J={AnsiX923:T,ISO10126:W,ISO97971:q,Pkcs7:Q.l,NoPadding:X,Zero:G},Y={OpenSSLFormatter:V.w}}(),i}()})); \ No newline at end of file +!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={9691:function(n,t,r){r.d(t,{AES:function(){return _}});var i,e=r(9456),o=r(787),u=r(5693),f=r(9109),c=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return(s=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>8^255&e^99,a[r]=e,h[e]=r;var o=n[r],u=n[o],f=n[u],c=257*n[e]^16843008*e;v[r]=c<<24|c>>>8,w[r]=c<<16|c>>>16,l[r]=c<<8|c>>>24,b[r]=c,c=16843009*f^65537*u^257*o^16843008*r,d[e]=c<<24|c>>>8,y[e]=c<<16|c>>>16,p[e]=c<<8|c>>>24,O[e]=c,r?(r=o^n[n[n[f^o]]],i^=n[n[i]]):r=i=1}}();var j=[0,1,2,4,8,16,32,64,128,27,54],_=function(n){function t(t){var r=n.call(this,t)||this;return r.u=0,r.h=[],r.v=[],r.O=t,r.A(),r}return c(t,n),t.prototype.A=function(){var n;if(!this.u||this.k!==this.H){for(var t=this.k=this.H,r=t.words,i=t.nSigBytes/4,e=4*((this.u=i+6)+1),o=this.h=[],u=0;u6&&u%i==4&&(n=a[n>>>24]<<24|a[n>>>16&255]<<16|a[n>>>8&255]<<8|a[255&n]):(n=a[(n=n<<8|n>>>24)>>>24]<<24|a[n>>>16&255]<<16|a[n>>>8&255]<<8|a[255&n],n^=j[u/i|0]<<24),o[u]=o[u-i]^n);this.v=[];for(var f=0;f>>24]]^y[a[n>>>16&255]]^p[a[n>>>8&255]]^O[a[255&n]]}}},t.prototype.encryptBlock=function(n,t){this.B(n,t,this.h,v,w,l,b,a)},t.prototype.decryptBlock=function(n,t){var r=n[t+1];n[t+1]=n[t+3],n[t+3]=r,this.B(n,t,this.v,d,y,p,O,h),r=n[t+1],n[t+1]=n[t+3],n[t+3]=r},t.prototype.B=function(n,t,r,i,e,o,u,f){for(var c=this.u,s=n[t]^r[0],a=n[t+1]^r[1],h=n[t+2]^r[2],v=n[t+3]^r[3],w=4,l=1;l>>24]^e[a>>>16&255]^o[h>>>8&255]^u[255&v]^r[w++],d=i[a>>>24]^e[h>>>16&255]^o[v>>>8&255]^u[255&s]^r[w++],y=i[h>>>24]^e[v>>>16&255]^o[s>>>8&255]^u[255&a]^r[w++],p=i[v>>>24]^e[s>>>16&255]^o[a>>>8&255]^u[255&h]^r[w++];s=b,a=d,h=y,v=p}var O=(f[s>>>24]<<24|f[a>>>16&255]<<16|f[h>>>8&255]<<8|f[255&v])^r[w++],j=(f[a>>>24]<<24|f[h>>>16&255]<<16|f[v>>>8&255]<<8|f[255&s])^r[w++],_=(f[h>>>24]<<24|f[v>>>16&255]<<16|f[s>>>8&255]<<8|f[255&a])^r[w++],m=(f[v>>>24]<<24|f[s>>>16&255]<<16|f[a>>>8&255]<<8|f[255&h])^r[w++];n[t]=O,n[t+1]=j,n[t+2]=_,n[t+3]=m},t.createEncryptor=function(n,r){return new t(s(s({},r=void 0===r?{}:r),{key:n,transformMode:e.t.ENC_TRANSFORM_MODE}))},t.createDecryptor=function(n,r){return new t(s(s({},r=void 0===r?{}:r),{key:n,transformMode:e.t.DEC_TRANSFORM_MODE}))},t.encrypt=function(n,r,i){if("string"==typeof r)return u.E.encrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){if("string"==typeof r)return u.E.decrypt(t,n,r,i);if(r.nSigBytes%4!=0)throw new Error("Key size must be multiple of 32bit/4byte/1word");return f.D.decrypt(t,n,r,i)},t.keySize=8,t}(o.G)},3967:function(n,t,r){r.d(t,{CBCMAC:function(){return f}});var i=r(4768),e=r(3354),o=r(9691),u=r(3664);function f(n,t,r,f,c,s){var a=s&&s.Cipher?s.Cipher:o.AES,h="string"==typeof r?i.d.parse(r):r,v=f||new e.e([0,0]),w="string"==typeof t?i.d.parse(t):t,l="string"==typeof n?i.d.parse(n):n,b=c||16;return u.K.mac(a,h,v,w,l,b)}},9910:function(n,t,r){r.d(t,{DES:function(){return b}});var i,e=r(787),o=r(9456),u=r(5693),f=r(9109),c=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=function(){return(s=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>5]>>>31-i%32&1}for(var e=this.I=[],o=0;o<16;o++){var u=e[o]=[],f=v[o];for(r=0;r<24;r++)u[r/6|0]|=t[(h[r]-1+f)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(h[r+24]-1+f)%28]<<31-r%6;u[0]=u[0]<<1|u[0]>>>31;for(r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}this.U=[];for(r=0;r<16;r++)this.U[r]=e[15-r]},t.prototype.encryptBlock=function(n,t){this.R(n,t,this.I)},t.prototype.decryptBlock=function(n,t){this.R(n,t,this.U)},t.prototype.R=function(n,t,r){this.L=n[t],this.F=n[t+1],this.X(4,252645135),this.X(16,65535),this.Z(2,858993459),this.Z(8,16711935),this.X(1,1431655765);for(var i=0;i<16;i++){for(var e=r[i],o=this.L,u=this.F,f=0,c=0;c<8;c++){var s=(u^e[c])&l[c];f|=w[c][s>>>0]}this.L=u,this.F=o^f}var a=this.L;this.L=this.F,this.F=a,this.X(1,1431655765),this.Z(8,16711935),this.Z(2,858993459),this.X(16,65535),this.X(4,252645135),n[t]=this.L,n[t+1]=this.F},t.prototype.X=function(n,t){var r=(this.L>>>n^this.F)&t;this.F^=r,this.L^=r<>>n^this.L)&t;this.L^=r,this.F^=r<192.");var t=n.slice(0,2),r=n.length<4?n.slice(0,2):n.slice(2,4),i=n.length<6?n.slice(0,2):n.slice(4,6);return[f.DES.createEncryptor(new c.e(t)),f.DES.createEncryptor(new c.e(r)),f.DES.createEncryptor(new c.e(i))]},t.prototype.A=function(){var n=this.J();this.Y=n[0],this.$=n[1],this.nn=n[2]},t.prototype.encryptBlock=function(n,t){this.Y.encryptBlock(n,t),this.$.decryptBlock(n,t),this.nn.encryptBlock(n,t)},t.prototype.decryptBlock=function(n,t){this.nn.decryptBlock(n,t),this.$.encryptBlock(n,t),this.Y.decryptBlock(n,t)},t.createEncryptor=function(n,r){return new t(h(h({},r=void 0===r?{}:r),{key:n,transformMode:u.t.ENC_TRANSFORM_MODE}))},t.createDecryptor=function(n,r){return new t(h(h({},r=void 0===r?{}:r),{key:n,transformMode:u.t.DEC_TRANSFORM_MODE}))},t.encrypt=function(n,r,i){return"string"==typeof r?s.E.encrypt(t,n,r,i):e.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?s.E.decrypt(t,n,r,i):e.D.decrypt(t,n,r,i)},t.keySize=6,t.ivSize=2,t}(o.G)},7753:function(n,t,r){r.d(t,{GMAC:function(){return f}});var i=r(4768),e=r(3354),o=r(9691),u=r(5607);function f(n,t,r,f,c){var s="string"==typeof n?i.d.parse(n):n,a=r||new e.e([0,0,0,0]),h=c&&c.Cipher?c.Cipher:o.AES,v="string"==typeof t?i.d.parse(t):t,w=f||16;return u.V.mac(h,v,a,s,void 0,w)}},6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.tn=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.rn=t.clone(),u=this.en=t.clone(),f=o.words,c=u.words,s=0;s>>32-o)+t}function s(n,t,r,i,e,o,u){var f=n+(t&i|r&~i)+e+u;return(f<>>32-o)+t}function a(n,t,r,i,e,o,u){var f=n+(t^r^i)+e+u;return(f<>>32-o)+t}function h(n,t,r,i,e,o,u){var f=n+(r^(t|~i))+e+u;return(f<>>32-o)+t}!function(){for(var n=0;n<64;n++)f[n]=4294967296*Math.abs(Math.sin(n+1))|0}();var v=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new e.e([1732584193,4023233417,2562383102,271733878]),t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new e.e([1732584193,4023233417,2562383102,271733878])},t.prototype.un=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this.on.words,u=n[t],v=n[t+1],w=n[t+2],l=n[t+3],b=n[t+4],d=n[t+5],y=n[t+6],p=n[t+7],O=n[t+8],j=n[t+9],_=n[t+10],m=n[t+11],A=n[t+12],g=n[t+13],E=n[t+14],S=n[t+15],M=o[0],k=o[1],H=o[2],C=o[3];M=c(M,k,H,C,u,7,f[0]),C=c(C,M,k,H,v,12,f[1]),H=c(H,C,M,k,w,17,f[2]),k=c(k,H,C,M,l,22,f[3]),M=c(M,k,H,C,b,7,f[4]),C=c(C,M,k,H,d,12,f[5]),H=c(H,C,M,k,y,17,f[6]),k=c(k,H,C,M,p,22,f[7]),M=c(M,k,H,C,O,7,f[8]),C=c(C,M,k,H,j,12,f[9]),H=c(H,C,M,k,_,17,f[10]),k=c(k,H,C,M,m,22,f[11]),M=c(M,k,H,C,A,7,f[12]),C=c(C,M,k,H,g,12,f[13]),H=c(H,C,M,k,E,17,f[14]),M=s(M,k=c(k,H,C,M,S,22,f[15]),H,C,v,5,f[16]),C=s(C,M,k,H,y,9,f[17]),H=s(H,C,M,k,m,14,f[18]),k=s(k,H,C,M,u,20,f[19]),M=s(M,k,H,C,d,5,f[20]),C=s(C,M,k,H,_,9,f[21]),H=s(H,C,M,k,S,14,f[22]),k=s(k,H,C,M,b,20,f[23]),M=s(M,k,H,C,j,5,f[24]),C=s(C,M,k,H,E,9,f[25]),H=s(H,C,M,k,l,14,f[26]),k=s(k,H,C,M,O,20,f[27]),M=s(M,k,H,C,g,5,f[28]),C=s(C,M,k,H,w,9,f[29]),H=s(H,C,M,k,p,14,f[30]),M=a(M,k=s(k,H,C,M,A,20,f[31]),H,C,d,4,f[32]),C=a(C,M,k,H,O,11,f[33]),H=a(H,C,M,k,m,16,f[34]),k=a(k,H,C,M,E,23,f[35]),M=a(M,k,H,C,v,4,f[36]),C=a(C,M,k,H,b,11,f[37]),H=a(H,C,M,k,p,16,f[38]),k=a(k,H,C,M,_,23,f[39]),M=a(M,k,H,C,g,4,f[40]),C=a(C,M,k,H,u,11,f[41]),H=a(H,C,M,k,l,16,f[42]),k=a(k,H,C,M,y,23,f[43]),M=a(M,k,H,C,j,4,f[44]),C=a(C,M,k,H,A,11,f[45]),H=a(H,C,M,k,S,16,f[46]),M=h(M,k=a(k,H,C,M,w,23,f[47]),H,C,u,6,f[48]),C=h(C,M,k,H,p,10,f[49]),H=h(H,C,M,k,E,15,f[50]),k=h(k,H,C,M,d,21,f[51]),M=h(M,k,H,C,A,6,f[52]),C=h(C,M,k,H,l,10,f[53]),H=h(H,C,M,k,_,15,f[54]),k=h(k,H,C,M,v,21,f[55]),M=h(M,k,H,C,O,6,f[56]),C=h(C,M,k,H,S,10,f[57]),H=h(H,C,M,k,y,15,f[58]),k=h(k,H,C,M,g,21,f[59]),M=h(M,k,H,C,b,6,f[60]),C=h(C,M,k,H,m,10,f[61]),H=h(H,C,M,k,w,15,f[62]),k=h(k,H,C,M,j,21,f[63]),o[0]=o[0]+M|0,o[1]=o[1]+k|0,o[2]=o[2]+H|0,o[3]=o[3]+C|0},t.prototype.fn=function(){var n=this.cn,t=n.words,r=8*this.sn,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32;var e=Math.floor(r/4294967296),o=r;t[15+(i+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n.nSigBytes=4*(t.length+1),this.an();for(var u=this.on,f=u.words,c=0;c<4;c++){var s=f[c];f[c]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return u},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n){return(new t).finalize(n)},t}(o.P)},4615:function(n,t,r){r.d(t,{RC4:function(){return s}});var i,e=r(30),o=r(5693),u=r(9109),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(){return(c=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>2]>>>24-o%4*8&255;e=(e+this.S[i]+u)%256;var f=this.S[i];this.S[i]=this.S[e],this.S[e]=f}this.i=this.j=0},t.prototype.un=function(n,t){n[t]^=this.generateKeyStreamWord()},t.prototype.generateKeyStreamWord=function(){for(var n=this.S,t=this.i,r=this.j,i=0,e=0;e<4;e++){r=(r+n[t=(t+1)%256])%256;var o=n[t];n[t]=n[r],n[r]=o,i|=n[(n[t]+n[r])%256]<<24-8*e}return this.i=t,this.j=r,i},t.createEncryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?o.E.encrypt(t,n,r,i):u.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?o.E.decrypt(t,n,r,i):u.D.decrypt(t,n,r,i)},t.ivSize=0,t.keySize=8,t}(e.q)},9639:function(n,t,r){r.d(t,{RC4Drop:function(){return s}});var i,e=r(5693),o=r(9109),u=r(4615),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(){return(c=Object.assign||function(n){for(var t,r=1,i=arguments.length;r0;t--)this.generateKeyStreamWord()},t.createEncryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?e.E.encrypt(t,n,r,i):o.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?e.E.decrypt(t,n,r,i):o.D.decrypt(t,n,r,i)},t}(u.RC4)},7104:function(n,t,r){r.d(t,{RIPEMD160:function(){return O}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=new o.e([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]),c=new o.e([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]),s=new o.e([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]),a=new o.e([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]),h=new o.e([0,1518500249,1859775393,2400959708,2840853838]),v=new o.e([1352829926,1548603684,1836072691,2053994217,0]);function w(n,t,r){return n^t^r}function l(n,t,r){return n&t|~n&r}function b(n,t,r){return(n|~t)^r}function d(n,t,r){return n&r|t&~r}function y(n,t,r){return n^(t|~r)}function p(n,t){return n<>>32-t}var O=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new o.e([1732584193,4023233417,2562383102,271733878,3285377520]),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new o.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.un=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o,u,O,j,_,m,A,g,E,S,M,k=this.on.words,H=h.words,C=v.words,B=f.words,N=c.words,I=s.words,z=a.words;m=o=k[0],A=u=k[1],g=O=k[2],E=j=k[3],S=_=k[4];for(r=0;r<80;r+=1)M=o+n[t+B[r]]|0,M+=r<16?w(u,O,j)+H[0]:r<32?l(u,O,j)+H[1]:r<48?b(u,O,j)+H[2]:r<64?d(u,O,j)+H[3]:y(u,O,j)+H[4],M=(M=p(M|=0,I[r]))+_|0,o=_,_=j,j=p(O,10),O=u,u=M,M=m+n[t+N[r]]|0,M+=r<16?y(A,g,E)+C[0]:r<32?d(A,g,E)+C[1]:r<48?b(A,g,E)+C[2]:r<64?l(A,g,E)+C[3]:w(A,g,E)+C[4],M=(M=p(M|=0,z[r]))+S|0,m=S,S=E,E=p(g,10),g=A,A=M;M=k[1]+O+E|0,k[1]=k[2]+j+S|0,k[2]=k[3]+_+m|0,k[3]=k[4]+o+A|0,k[4]=k[0]+u+g|0,k[0]=M},t.prototype.fn=function(){var n=this.cn,t=n.words,r=8*this.sn,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),n.nSigBytes=4*(t.length+1),this.an();for(var e=this.on,o=e.words,u=0;u<5;u++){var f=o[u];o[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return e},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},5187:function(n,t,r){r.d(t,{Rabbit:function(){return s}});var i,e=r(30),o=r(5693),u=r(9109),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=function(){return(c=Object.assign||function(n){for(var t,r=1,i=arguments.length;r>>24)|4278255360&(n[r]<<24|n[r]>>>8);var i=this.hn=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],e=this.vn=[n[2]<<16|n[2]>>>16,4294901760&n[0]|65535&n[1],n[3]<<16|n[3]>>>16,4294901760&n[1]|65535&n[2],n[0]<<16|n[0]>>>16,4294901760&n[2]|65535&n[3],n[1]<<16|n[1]>>>16,4294901760&n[3]|65535&n[0]];this.wn=0;for(r=0;r<4;r++)this.nextState();for(r=0;r<8;r++)e[r]^=i[r+4&7];if(t){var o=t.words,u=o[0],f=o[1],c=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),s=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),a=c>>>16|4294901760&s,h=s<<16|65535&c;e[0]^=c,e[1]^=a,e[2]^=s,e[3]^=h,e[4]^=c,e[5]^=a,e[6]^=s,e[7]^=h;for(r=0;r<4;r++)this.nextState()}},t.prototype.un=function(n,t){var r=this.hn;this.nextState(),this.S[0]=r[0]^r[5]>>>16^r[3]<<16,this.S[1]=r[2]^r[7]>>>16^r[5]<<16,this.S[2]=r[4]^r[1]>>>16^r[7]<<16,this.S[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)this.S[i]=16711935&(this.S[i]<<8|this.S[i]>>>24)|4278255360&(this.S[i]<<24|this.S[i]>>>8),n[t+i]^=this.S[i]},t.prototype.nextState=function(){for(var n=this.hn,t=this.vn,r=0;r<8;r++)this.C[r]=t[r];t[0]=t[0]+1295307597+this.wn|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this.wn=t[7]>>>0>>0?1:0;for(r=0;r<8;r++){var i=n[r]+t[r],e=65535&i,o=i>>>16,u=((e*e>>>17)+e*o>>>15)+o*o,f=((4294901760&i)*i|0)+((65535&i)*i|0);this.G[r]=u^f}var c=this.G;n[0]=c[0]+(c[7]<<16|c[7]>>>16)+(c[6]<<16|c[6]>>>16)|0,n[1]=c[1]+(c[0]<<8|c[0]>>>24)+c[7]|0,n[2]=c[2]+(c[1]<<16|c[1]>>>16)+(c[0]<<16|c[0]>>>16)|0,n[3]=c[3]+(c[2]<<8|c[2]>>>24)+c[1]|0,n[4]=c[4]+(c[3]<<16|c[3]>>>16)+(c[2]<<16|c[2]>>>16)|0,n[5]=c[5]+(c[4]<<8|c[4]>>>24)+c[3]|0,n[6]=c[6]+(c[5]<<16|c[5]>>>16)+(c[4]<<16|c[4]>>>16)|0,n[7]=c[7]+(c[6]<<8|c[6]>>>24)+c[5]|0},t.createEncryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.createDecryptor=function(n,r){return new t(c(c({},r=void 0===r?{}:r),{key:n}))},t.encrypt=function(n,r,i){return"string"==typeof r?o.E.encrypt(t,n,r,i):u.D.encrypt(t,n,r,i)},t.decrypt=function(n,r,i){return"string"==typeof r?o.E.decrypt(t,n,r,i):u.D.decrypt(t,n,r,i)},t.ivSize=4,t}(e.q)},3173:function(n,t,r){r.d(t,{SHA1:function(){return c}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[],c=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new o.e([1732584193,4023233417,2562383102,271733878,3285377520]),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new o.e([1732584193,4023233417,2562383102,271733878,3285377520])},t.prototype.un=function(n,t){for(var r=this.on.words,i=r[0],e=r[1],o=r[2],u=r[3],c=r[4],s=0;s<80;s++){if(s<16)f[s]=0|n[t+s];else{var a=f[s-3]^f[s-8]^f[s-14]^f[s-16];f[s]=a<<1|a>>>31}var h=(i<<5|i>>>27)+c+f[s];h+=s<20?1518500249+(e&o|~e&u):s<40?1859775393+(e^o^u):s<60?(e&o|e&u|o&u)-1894007588:(e^o^u)-899497514,c=u,u=o,o=e<<30|e>>>2,e=i,i=h}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+c|0},t.prototype.fn=function(){var n=this.cn.words,t=8*this.sn,r=8*this.cn.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.cn.nSigBytes=4*n.length,this.an(),this.on},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},766:function(n,t,r){r.d(t,{SHA224:function(){return f}});var i,e=r(3354),o=r(5561),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new e.e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new e.e([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},t.prototype.fn=function(){var t=n.prototype.fn.call(this);return t.nSigBytes-=4,t},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(o.SHA256)},5561:function(n,t,r){r.d(t,{SHA256:function(){return v}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[],c=[];function s(n){for(var t=Math.sqrt(n),r=2;r<=t;r++)if(!(n%r))return!1;return!0}function a(n){return 4294967296*(n-(0|n))|0}!function(){for(var n=2,t=0;t<64;)s(n)&&(t<8&&(f[t]=a(Math.pow(n,.5))),c[t]=a(Math.pow(n,1/3)),t++),n++}();var h=[],v=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new o.e(f.slice(0)),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new o.e(f.slice(0))},t.prototype.un=function(n,t){for(var r=this.on.words,i=r[0],e=r[1],o=r[2],u=r[3],f=r[4],s=r[5],a=r[6],v=r[7],w=0;w<64;w++){if(w<16)h[w]=0|n[t+w];else{var l=h[w-15],b=(l<<25|l>>>7)^(l<<14|l>>>18)^l>>>3,d=h[w-2],y=(d<<15|d>>>17)^(d<<13|d>>>19)^d>>>10;h[w]=b+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,O=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),j=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&s^~f&a)+c[w]+h[w];v=a,a=s,s=f,f=u+j|0,u=o,o=e,e=i,i=j+(O+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+s|0,r[6]=r[6]+a|0,r[7]=r[7]+v|0},t.prototype.fn=function(){var n=this.cn.words,t=8*this.sn,r=8*this.cn.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.cn.nSigBytes=4*n.length,this.an(),this.on},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3408:function(n,t,r){r.d(t,{SHA3:function(){return v}});var i,e=r(6957),o=r(1868),u=r(3354),f=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c=[],s=[],a=[];!function(){for(var n=1,t=0,r=0;r<24;r++){c[n+5*t]=(r+1)*(r+2)/2%64;var i=(2*n+3*t)%5;n=t%5,t=i}for(var o=0;o<5;o++)for(var u=0;u<5;u++)s[o+5*u]=u+(2*o+3*u)%5*5;for(var f=1,h=0;h<24;h++){for(var v=0,w=0,l=0;l<7;l++){if(1&f){var b=(1<>>24)|4278255360&(o<<24|o>>>8),u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),r[e].high^=u,r[e].low^=o}for(var f=0;f<24;f++){for(var v=0;v<5;v++){for(var w=0,l=0,b=0;b<5;b++){w^=(k=r[v+5*b]).high,l^=k.low}var d=h[v];d.high=w,d.low=l}for(v=0;v<5;v++){var y=h[(v+4)%5],p=h[(v+1)%5],O=p.high,j=p.low;for(w=y.high^(O<<1|j>>>31),l=y.low^(j<<1|O>>>31),b=0;b<5;b++){(k=r[v+5*b]).high^=w,k.low^=l}}for(var _=1;_<25;_++){w=void 0,l=void 0;var m=r[_].high,A=r[_].low,g=c[_];g<32?(w=m<>>32-g,l=A<>>32-g):(w=A<>>64-g,l=m<>>64-g);var E=h[s[_]];E.high=w,E.low=l}var S=h[0],M=r[0];S.high=M.high,S.low=M.low;for(v=0;v<5;v++)for(b=0;b<5;b++){var k=r[_=v+5*b],H=h[_],C=h[(v+1)%5+5*b],B=h[(v+2)%5+5*b];k.high=H.high^~C.high&B.high,k.low=H.low^~C.low&B.low}var N=r[0],I=a[f];N.high^=I.high,N.low^=I.low}},t.prototype.fn=function(){var n=this.cn,t=n.words,r=8*n.nSigBytes,i=32*this.blockSize;t[r>>>5]|=1<<24-r%32,t[(Math.ceil((r+1)/i)*i>>>5)-1]|=128,n.nSigBytes=4*t.length,this.an();for(var e=this.bn,o=this.dn/8,f=o/8,c=[],s=0;s>>24)|4278255360&(h<<24|h>>>8),v=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),c.push(v),c.push(h)}return new u.e(c,o)},t.prototype.clone=function(){return new t({outputLength:this.dn,state:this.bn,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(o.P)},6324:function(n,t,r){r.d(t,{SHA384:function(){return f}});var i,e=r(6957),o=r(7491),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=function(n){function t(t){var r=n.call(this,t)||this;return r.on=new e.m([new e.r(3418070365,3238371032),new e.r(1654270250,914150663),new e.r(2438529370,812702999),new e.r(355462360,4144912697),new e.r(1731405415,4290775857),new e.r(2394180231,1750603025),new e.r(3675008525,1694076839),new e.r(1203062813,3204075428)]),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new e.m([new e.r(3418070365,3238371032),new e.r(1654270250,914150663),new e.r(2438529370,812702999),new e.r(355462360,4144912697),new e.r(1731405415,4290775857),new e.r(2394180231,1750603025),new e.r(3675008525,1694076839),new e.r(1203062813,3204075428)])},t.prototype.fn=function(){var t=n.prototype.fn.call(this);return t.nSigBytes-=16,t},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(o.SHA512)},7491:function(n,t,r){r.d(t,{SHA512:function(){return s}});var i,e=r(1868),o=r(6957),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[new o.r(1116352408,3609767458),new o.r(1899447441,602891725),new o.r(3049323471,3964484399),new o.r(3921009573,2173295548),new o.r(961987163,4081628472),new o.r(1508970993,3053834265),new o.r(2453635748,2937671579),new o.r(2870763221,3664609560),new o.r(3624381080,2734883394),new o.r(310598401,1164996542),new o.r(607225278,1323610764),new o.r(1426881987,3590304994),new o.r(1925078388,4068182383),new o.r(2162078206,991336113),new o.r(2614888103,633803317),new o.r(3248222580,3479774868),new o.r(3835390401,2666613458),new o.r(4022224774,944711139),new o.r(264347078,2341262773),new o.r(604807628,2007800933),new o.r(770255983,1495990901),new o.r(1249150122,1856431235),new o.r(1555081692,3175218132),new o.r(1996064986,2198950837),new o.r(2554220882,3999719339),new o.r(2821834349,766784016),new o.r(2952996808,2566594879),new o.r(3210313671,3203337956),new o.r(3336571891,1034457026),new o.r(3584528711,2466948901),new o.r(113926993,3758326383),new o.r(338241895,168717936),new o.r(666307205,1188179964),new o.r(773529912,1546045734),new o.r(1294757372,1522805485),new o.r(1396182291,2643833823),new o.r(1695183700,2343527390),new o.r(1986661051,1014477480),new o.r(2177026350,1206759142),new o.r(2456956037,344077627),new o.r(2730485921,1290863460),new o.r(2820302411,3158454273),new o.r(3259730800,3505952657),new o.r(3345764771,106217008),new o.r(3516065817,3606008344),new o.r(3600352804,1432725776),new o.r(4094571909,1467031594),new o.r(275423344,851169720),new o.r(430227734,3100823752),new o.r(506948616,1363258195),new o.r(659060556,3750685593),new o.r(883997877,3785050280),new o.r(958139571,3318307427),new o.r(1322822218,3812723403),new o.r(1537002063,2003034995),new o.r(1747873779,3602036899),new o.r(1955562222,1575990012),new o.r(2024104815,1125592928),new o.r(2227730452,2716904306),new o.r(2361852424,442776044),new o.r(2428436474,593698344),new o.r(2756734187,3733110249),new o.r(3204031479,2999351573),new o.r(3329325298,3815920427),new o.r(3391569614,3928383900),new o.r(3515267271,566280711),new o.r(3940187606,3454069534),new o.r(4118630271,4000239992),new o.r(116418474,1914138554),new o.r(174292421,2731055270),new o.r(289380356,3203993006),new o.r(460393269,320620315),new o.r(685471733,587496836),new o.r(852142971,1086792851),new o.r(1017036298,365543100),new o.r(1126000580,2618297676),new o.r(1288033470,3409855158),new o.r(1501505948,4234509866),new o.r(1607167915,987167468),new o.r(1816402316,1246189591)],c=[];!function(){for(var n=0;n<80;n++)c[n]=new o.r(0,0)}();var s=function(n){function t(t){var r=n.call(this,t)||this;return r.N=32,r.on=new o.m([new o.r(1779033703,4089235720),new o.r(3144134277,2227873595),new o.r(1013904242,4271175723),new o.r(2773480762,1595750129),new o.r(1359893119,2917565137),new o.r(2600822924,725511199),new o.r(528734635,4215389547),new o.r(1541459225,327033209)]),r.O=t,t&&void 0!==t.hash&&(r.on=t.hash.clone()),r}return u(t,n),t.prototype.A=function(){this.on=new o.m([new o.r(1779033703,4089235720),new o.r(3144134277,2227873595),new o.r(1013904242,4271175723),new o.r(2773480762,1595750129),new o.r(1359893119,2917565137),new o.r(2600822924,725511199),new o.r(528734635,4215389547),new o.r(1541459225,327033209)])},t.prototype.un=function(n,t){for(var r=this.on.words,i=r[0],e=r[1],o=r[2],u=r[3],s=r[4],a=r[5],h=r[6],v=r[7],w=i.high,l=i.low,b=e.high,d=e.low,y=o.high,p=o.low,O=u.high,j=u.low,_=s.high,m=s.low,A=a.high,g=a.low,E=h.high,S=h.low,M=v.high,k=v.low,H=w,C=l,B=b,N=d,I=y,z=p,D=O,U=j,L=_,F=m,x=A,P=g,R=E,T=S,K=M,W=k,G=0;G<80;G++){var q=void 0,Q=void 0,X=c[G];if(G<16)Q=X.high=0|n[t+2*G],q=X.low=0|n[t+2*G+1];else{var V=c[G-15],Z=V.high,J=V.low,Y=(Z>>>1|J<<31)^(Z>>>8|J<<24)^Z>>>7,$=(J>>>1|Z<<31)^(J>>>8|Z<<24)^(J>>>7|Z<<25),nn=c[G-2],tn=nn.high,rn=nn.low,en=(tn>>>19|rn<<13)^(tn<<3|rn>>>29)^tn>>>6,on=(rn>>>19|tn<<13)^(rn<<3|tn>>>29)^(rn>>>6|tn<<26),un=c[G-7],fn=un.high,cn=un.low,sn=c[G-16],an=sn.high,hn=sn.low;Q=(Q=(Q=Y+fn+((q=$+cn)>>>0<$>>>0?1:0))+en+((q+=on)>>>0>>0?1:0))+an+((q+=hn)>>>0>>0?1:0),X.high=Q,X.low=q}var vn=L&x^~L&R,wn=F&P^~F&T,ln=H&B^H&I^B&I,bn=C&N^C&z^N&z,dn=(H>>>28|C<<4)^(H<<30|C>>>2)^(H<<25|C>>>7),yn=(C>>>28|H<<4)^(C<<30|H>>>2)^(C<<25|H>>>7),pn=(L>>>14|F<<18)^(L>>>18|F<<14)^(L<<23|F>>>9),On=(F>>>14|L<<18)^(F>>>18|L<<14)^(F<<23|L>>>9),jn=f[G],_n=jn.high,mn=jn.low,An=W+On,gn=K+pn+(An>>>0>>0?1:0),En=yn+bn;K=R,W=T,R=x,T=P,x=L,P=F,L=D+(gn=(gn=(gn=gn+vn+((An+=wn)>>>0>>0?1:0))+_n+((An+=mn)>>>0>>0?1:0))+Q+((An+=q)>>>0>>0?1:0))+((F=U+An|0)>>>0>>0?1:0)|0,D=I,U=z,I=B,z=N,B=H,N=C,H=gn+(dn+ln+(En>>>0>>0?1:0))+((C=An+En|0)>>>0>>0?1:0)|0}l=i.low=l+C,i.high=w+H+(l>>>0>>0?1:0),d=e.low=d+N,e.high=b+B+(d>>>0>>0?1:0),p=o.low=p+z,o.high=y+I+(p>>>0>>0?1:0),j=u.low=j+U,u.high=O+D+(j>>>0>>0?1:0),m=s.low=m+F,s.high=_+L+(m>>>0>>0?1:0),g=a.low=g+P,a.high=A+x+(g>>>0

>>0?1:0),S=h.low=S+T,h.high=E+R+(S>>>0>>0?1:0),k=v.low=k+W,v.high=M+K+(k>>>0>>0?1:0)},t.prototype.fn=function(){var n=this.cn,t=n.words,r=8*this.sn,i=8*n.nSigBytes;return t[i>>>5]|=128<<24-i%32,t[30+(i+128>>>10<<5)]=Math.floor(r/4294967296),t[31+(i+128>>>10<<5)]=r,n.nSigBytes=4*t.length,this.an(),this.on.to32()},t.prototype.clone=function(){return new t({hash:this.on,blockSize:this.N,data:this.cn,nBytes:this.sn})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.yn=Array.isArray(t)?t:[],void(this.pn="number"==typeof r?r:4*this.yn.length);if(t instanceof n)return this.yn=t.words.slice(),void(this.pn=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.yn=o,this.pn=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.pn},set:function(n){this.pn=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.yn},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.yn,t=this.pn,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.pn%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.yn[this.pn+i>>>2]|=e<<24-(this.pn+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.pn+=r,this},n.prototype.clamp=function(){var n=this.pn;this.yn[n>>>2]&=4294967295<<32-n%4*8,this.yn.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.yn.slice(),this.pn)},n.random=function(t){for(var r=[],i=0;i0&&e.push(0),n.concat(new i.e(e,r))}}function o(n,t){return new i.e(n.words.slice(),t)}function u(n,t){for(var r=n.nSigBytes-t,e=[],o=0;o>>2,f=r+o,c=f>>>2,s=n.words[c]>>>24-f%4*8&255;e[u]=0|e[u]|s<<24-o%4*8}var a=new i.e(e,t);return a.clamp(),a}},7919:function(n,t,r){r.d(t,{l:function(){return e}});var i=r(3354);var e={pad:function(n,t){for(var r=4*t,e=r-n.nSigBytes%r,o=e<<24|e<<16|e<<8|e,u=[],f=0;f>>2];n.nSigBytes-=t}}},1756:function(n,t,r){r.d(t,{w:function(){return u}});var i,e="undefined"!=typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",o=(i=parseInt((/msie (\d+)/.exec(e)||[])[1],10),isNaN(i)?(i=parseInt((/trident\/.*; rv:(\d+)/.exec(e)||[])[1],10),!isNaN(i)&&i):i);function u(n,t){return!1!==o&&(!t||("<"===n?o"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,s=0;s>>6-s%4*2;f[c>>>2]|=a<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},2688:function(n,t,r){r.d(t,{Base64:function(){return o.D},EvpKDF:function(){return O},Hex:function(){return c.p},Latin1:function(){return f.m},OpenSSLKDF:function(){return l.s},PBKDF2:function(){return b.E},Utf16:function(){return w},Utf16BE:function(){return s},Utf16LE:function(){return v},Utf8:function(){return u.d},Word32Array:function(){return i.e},Word64:function(){return e.r},Word64Array:function(){return e.m}});r(9054);var i=r(3354),e=r(6957),o=(r(1756),r(1773)),u=r(4768),f=r(8702),c=r(5720),s={stringify:function(n){for(var t=n.words,r=n.nSigBytes,i=[],e=0;e>>2]>>>16-e%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>1]|=n.charCodeAt(e)<<16-e%2*16;return new i.e(r,2*t)}};function a(n){return n<<8&4278255360|n>>>8&16711935}var h,v={stringify:function(n){for(var t=n.words,r=n.nSigBytes,i=[],e=0;e>>2]>>>16-e%4*8&65535);i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>1]|=a(n.charCodeAt(e)<<16-e%2*16);return new i.e(r,2*t)}},w=s,l=r(2214),b=r(7008),d=r(670),y=r(9541),p=(h=function(n,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}h(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),O=function(n){function t(t){var r=n.call(this,t)||this;return r.Sn=4,r.Mn=d.MD5,r.kn=1,t&&(r.Sn=void 0!==t.keySize?t.keySize:r.Sn,r.Mn=void 0!==t.Hasher?t.Hasher:r.Mn,r.kn=void 0!==t.iterations?t.iterations:r.kn),r}return p(t,n),t.prototype.compute=function(n,t){for(var r,e=new this.Mn,o=new i.e,u=o.words,f=this.Sn,c=this.kn;u.length13||e.nSigBytes<7))throw new Error("Byte size of iv must be between 7 and 13");return r.Nn=e||new o.e([0,0],8),r.In=15-r.Nn.nSigBytes,r}return f(t,n),t.getB0=function(n,t,r,i){if(r.nSigBytes+i.nSigBytes!==15)throw new Error("LEN(Q)+LEN(N) must be 15");var e=255&(0|(n?1:0)<<6|(t-2)/2<<3|r.nSigBytes-1),u=i.clone().concat(r);return new o.e([e<<24],1).concat(u)},t.formatAssociatedDataAndPayload=function(n,t){var r,i=n.nSigBytes;if(0===i)r=new o.e([0],0);else if(i4?(e.concat(new o.e([0],n%4)),e.concat(new o.e([r],4))):e.concat(new o.e([r<<32-8*n],n)):e.concat(new o.e([r],4)),i.concat(t).concat(e)},t.mac=function(n,r,i,e,f,c){var s=new n({key:r,iv:i});if(4!==s.blockSize)throw new Error("In CCM, cipher block size must be 128bit");if(i&&(i.nSigBytes>13||i.nSigBytes<7))throw new Error("Byte size of iv must be between 7 and 13");var a=i||new o.e([0,0],8),h=(null==e?void 0:e.clone())||new o.e,v=h.nSigBytes,w=(null==f?void 0:f.clone())||new o.e,l=w.nSigBytes;if(l>>>0>4294967295)throw new Error("Byte length of Payload(plainText) larger than 2^32-1 (4,294,967,295byte) is not supported at this time.");var b=15-a.nSigBytes,d=(0,u.ur)(new o.e([0,l],8),b),y=c||16,p=t.getB0(Boolean(v),y,d,a),O=t.formatAssociatedDataAndPayload(h,w),j=p.words.slice();s.encryptBlock(j,0);for(var _=O.nSigBytes/16,m=O.words,A=j,g=0;g<_;g++){var E=[m[4*g]^A[0],m[4*g+1]^A[1],m[4*g+2]^A[2],m[4*g+3]^A[3]];s.encryptBlock(E,0),A=E}var S=new o.e(A,y),M=t.genCtr(b,a,0);s.encryptBlock(M.words,0);for(g=0;g<4;g++)S.words[g]^=M.words[g];return S.clamp(),S},t.combineCipherTextAndAuthTag=function(n,t){return n.clone().concat(t)},t.splitCipherTextAndAuthTag=function(n,t){var r=t||16;return{cipherText:(0,u.z6)(n,n.nSigBytes-r),authTag:(0,u.ur)(n,r)}},t.createEncryptor=function(n){return new t.Encryptor(n)},t.createDecryptor=function(n){return new t.Decryptor(n)},t.Encryptor=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return f(r,n),r.prototype.processBlock=function(n,r){var i=this.Hn,e=i.blockSize,o=t.genCtr(this.In,this.Nn,this.Bn);i.encryptBlock(o.words,0);for(var u=0;u0?4-r.length%4:0,o=r.slice(),u=0;u>>0,i=r+1>>>0>>0,o=e+1>>>0>>5]>>>31-o%32&1)>0&&(i[0]=i[0]^e[0],i[1]=i[1]^e[1],i[2]=i[2]^e[2],i[3]=i[3]^e[3]);var u=(1&e[3])>>>0,f=(1&e[0])>>>0,c=(1&e[1])>>>0,s=(1&e[2])>>>0;e[0]=e[0]>>>1,e[1]=e[1]>>>1|(f?2147483648:0),e[2]=e[2]>>>1|(c?2147483648:0),e[3]=e[3]>>>1|(s?2147483648:0),u>0&&(e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3])}return i},t.GHASH=function(n,r){if(n.length%4!=0)throw new Error("Length of 32bit word array 'H' must be multiple of 4(128bit)");if(r.length%4!=0)throw new Error("Length of 32bit word array 'X' must be multiple of 4(128bit)");for(var i=r.length,e=[0,0,0,0],o=0;o0){var A=e[4*c+O]<<32-8*m^f[c][O];y.push(A),p+=m}var g=new o.e(y,p);a.concat(g)}}return a.nSigBytes=i.nSigBytes,a.clamp(),a},t.mac=function(n,r,i,e,f,c){var s=new n({key:r,iv:i}),a=[0,0,0,0];s.encryptBlock(a,0);var h=t.getJ0(a,i.words),v=(null==e?void 0:e.clone())||new o.e,w=[0,8*v.nSigBytes],l=(null==f?void 0:f.clone())||new o.e,b=[0,8*l.nSigBytes],d=c||16;(0,u.I4)(v),(0,u.I4)(l);var y=v.words.concat(l.words).concat(w).concat(b),p=t.GHASH(a,y),O=t.GCTR(s,h,new o.e(p));return(0,u.z6)(O,d)},t.createEncryptor=function(n){return new t.Encryptor(n)},t.createDecryptor=function(n){return new t.Decryptor(n)},t.Encryptor=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return f(r,n),r.prototype.processBlock=function(n,r){var i=this.Hn.blockSize;this.Un=t.inc32(this.Un);for(var e=new o.e(n.slice(r,r+i)),u=t.GCTR(this.Hn,this.Un,e),f=0;f>>2]|=e<<24-o%4*8,n.nSigBytes+=e},unpad:function(n){var t=255&n.words[n.nSigBytes-1>>>2];n.nSigBytes-=t}},K=r(3354);var W={pad:function(n,t){var r=4*t,i=r-n.nSigBytes%r;n.concat(K.e.random(i-1)).concat(new K.e([i<<24],1))},unpad:function(n){var t=255&n.words[n.nSigBytes-1>>>2];n.nSigBytes-=t}};var G={pad:function(n,t){var r=4*t;n.clamp(),n.nSigBytes+=r-(n.nSigBytes%r||r)},unpad:function(n){for(var t=n.words,r=n.nSigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){n.nSigBytes=r+1;break}}};var q={pad:function(n,t){n.concat(new K.e([2147483648],1)),G.pad(n,t)},unpad:function(n){G.unpad(n),n.nSigBytes-=1}},Q=r(7919);var X={pad:function(n,t){},unpad:function(n){}},V=r(1232),Z={CBC:C.n,CFB:I,CTR:D,ECB:L,OFB:x,GCM:P.V,CCM:R.K},J={AnsiX923:T,ISO10126:W,ISO97971:q,Pkcs7:Q.l,NoPadding:X,Zero:G},Y={OpenSSLFormatter:V.w}}(),i}()})); \ No newline at end of file diff --git a/dist/lib.js b/dist/lib.js index c04b86a..8931595 100644 --- a/dist/lib.js +++ b/dist/lib.js @@ -1 +1 @@ -!function(n,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else if("object"==typeof exports)exports.JsCrypto=t();else{var r=t();for(var i in n.JsCrypto=n.JsCrypto||{},r)n.JsCrypto[i]=r[i]}}(this,(function(){return function(){"use strict";var n={6367:function(n,t,r){r.d(t,{Hmac:function(){return e}});var i=r(4768),e=function(){function n(n,t){this.t=n,"string"==typeof t&&(t=i.d.parse(t));var r=n.blockSize,e=4*r;t.nSigBytes>e&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,a=0;a>>32-o)+t}function a(n,t,r,i,e,o,u){var f=n+(t&i|r&~i)+e+u;return(f<>>32-o)+t}function s(n,t,r,i,e,o,u){var f=n+(t^r^i)+e+u;return(f<>>32-o)+t}function h(n,t,r,i,e,o,u){var f=n+(r^(t|~i))+e+u;return(f<>>32-o)+t}!function(){for(var n=0;n<64;n++)f[n]=4294967296*Math.abs(Math.sin(n+1))|0}();var v=function(n){function t(t){var r=n.call(this,t)||this;return r.h=new e.e([1732584193,4023233417,2562383102,271733878]),t&&void 0!==t.hash&&(r.h=t.hash.clone()),r}return u(t,n),t.prototype.v=function(){this.h=new e.e([1732584193,4023233417,2562383102,271733878])},t.prototype.l=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this.h.words,u=n[t],v=n[t+1],w=n[t+2],d=n[t+3],b=n[t+4],l=n[t+5],y=n[t+6],p=n[t+7],m=n[t+8],g=n[t+9],j=n[t+10],O=n[t+11],A=n[t+12],_=n[t+13],M=n[t+14],E=n[t+15],S=o[0],U=o[1],I=o[2],N=o[3];S=c(S,U,I,N,u,7,f[0]),N=c(N,S,U,I,v,12,f[1]),I=c(I,N,S,U,w,17,f[2]),U=c(U,I,N,S,d,22,f[3]),S=c(S,U,I,N,b,7,f[4]),N=c(N,S,U,I,l,12,f[5]),I=c(I,N,S,U,y,17,f[6]),U=c(U,I,N,S,p,22,f[7]),S=c(S,U,I,N,m,7,f[8]),N=c(N,S,U,I,g,12,f[9]),I=c(I,N,S,U,j,17,f[10]),U=c(U,I,N,S,O,22,f[11]),S=c(S,U,I,N,A,7,f[12]),N=c(N,S,U,I,_,12,f[13]),I=c(I,N,S,U,M,17,f[14]),S=a(S,U=c(U,I,N,S,E,22,f[15]),I,N,v,5,f[16]),N=a(N,S,U,I,y,9,f[17]),I=a(I,N,S,U,O,14,f[18]),U=a(U,I,N,S,u,20,f[19]),S=a(S,U,I,N,l,5,f[20]),N=a(N,S,U,I,j,9,f[21]),I=a(I,N,S,U,E,14,f[22]),U=a(U,I,N,S,b,20,f[23]),S=a(S,U,I,N,g,5,f[24]),N=a(N,S,U,I,M,9,f[25]),I=a(I,N,S,U,d,14,f[26]),U=a(U,I,N,S,m,20,f[27]),S=a(S,U,I,N,_,5,f[28]),N=a(N,S,U,I,w,9,f[29]),I=a(I,N,S,U,p,14,f[30]),S=s(S,U=a(U,I,N,S,A,20,f[31]),I,N,l,4,f[32]),N=s(N,S,U,I,m,11,f[33]),I=s(I,N,S,U,O,16,f[34]),U=s(U,I,N,S,M,23,f[35]),S=s(S,U,I,N,v,4,f[36]),N=s(N,S,U,I,b,11,f[37]),I=s(I,N,S,U,p,16,f[38]),U=s(U,I,N,S,j,23,f[39]),S=s(S,U,I,N,_,4,f[40]),N=s(N,S,U,I,u,11,f[41]),I=s(I,N,S,U,d,16,f[42]),U=s(U,I,N,S,y,23,f[43]),S=s(S,U,I,N,g,4,f[44]),N=s(N,S,U,I,A,11,f[45]),I=s(I,N,S,U,E,16,f[46]),S=h(S,U=s(U,I,N,S,w,23,f[47]),I,N,u,6,f[48]),N=h(N,S,U,I,p,10,f[49]),I=h(I,N,S,U,M,15,f[50]),U=h(U,I,N,S,l,21,f[51]),S=h(S,U,I,N,A,6,f[52]),N=h(N,S,U,I,d,10,f[53]),I=h(I,N,S,U,j,15,f[54]),U=h(U,I,N,S,v,21,f[55]),S=h(S,U,I,N,m,6,f[56]),N=h(N,S,U,I,E,10,f[57]),I=h(I,N,S,U,y,15,f[58]),U=h(U,I,N,S,_,21,f[59]),S=h(S,U,I,N,b,6,f[60]),N=h(N,S,U,I,O,10,f[61]),I=h(I,N,S,U,w,15,f[62]),U=h(U,I,N,S,g,21,f[63]),o[0]=o[0]+S|0,o[1]=o[1]+U|0,o[2]=o[2]+I|0,o[3]=o[3]+N|0},t.prototype.j=function(){var n=this.O,t=n.words,r=8*this.A,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32;var e=Math.floor(r/4294967296),o=r;t[15+(i+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n.nSigBytes=4*(t.length+1),this.S();for(var u=this.h,f=u.words,c=0;c<4;c++){var a=f[c];f[c]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return u},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.U,data:this.O,nBytes:this.A})},t.hash=function(n){return(new t).finalize(n)},t}(o.P)},5561:function(n,t,r){r.d(t,{SHA256:function(){return v}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[],c=[];function a(n){for(var t=Math.sqrt(n),r=2;r<=t;r++)if(!(n%r))return!1;return!0}function s(n){return 4294967296*(n-(0|n))|0}!function(){for(var n=2,t=0;t<64;)a(n)&&(t<8&&(f[t]=s(Math.pow(n,.5))),c[t]=s(Math.pow(n,1/3)),t++),n++}();var h=[],v=function(n){function t(t){var r=n.call(this,t)||this;return r.h=new o.e(f.slice(0)),r.I=t,t&&void 0!==t.hash&&(r.h=t.hash.clone()),r}return u(t,n),t.prototype.v=function(){this.h=new o.e(f.slice(0))},t.prototype.l=function(n,t){for(var r=this.h.words,i=r[0],e=r[1],o=r[2],u=r[3],f=r[4],a=r[5],s=r[6],v=r[7],w=0;w<64;w++){if(w<16)h[w]=0|n[t+w];else{var d=h[w-15],b=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,l=h[w-2],y=(l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10;h[w]=b+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&a^~f&s)+c[w]+h[w];v=s,s=a,a=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+a|0,r[6]=r[6]+s|0,r[7]=r[7]+v|0},t.prototype.j=function(){var n=this.O.words,t=8*this.A,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.S(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.U,data:this.O,nBytes:this.A})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.N=Array.isArray(t)?t:[],void(this.B="number"==typeof r?r:4*this.N.length);if(t instanceof n)return this.N=t.words.slice(),void(this.B=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.N=o,this.B=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.B},set:function(n){this.B=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.N},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.N,t=this.B,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.B%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.N[this.B+i>>>2]|=e<<24-(this.B+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.B+=r,this},n.prototype.clamp=function(){var n=this.B;this.N[n>>>2]&=4294967295<<32-n%4*8,this.N.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.N.slice(),this.B)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,a=0;a>>6-a%4*2;f[c>>>2]|=s<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"L",{value:!0})};var i={};return function(){r.r(i),r.d(i,{Base64:function(){return u.D},EvpKDF:function(){return g},Hex:function(){return a.p},Latin1:function(){return c.m},OpenSSLKDF:function(){return b.s},PBKDF2:function(){return l.E},Utf16:function(){return d},Utf16BE:function(){return s},Utf16LE:function(){return w},Utf8:function(){return f.d},Word32Array:function(){return t.e},Word64:function(){return e.r},Word64Array:function(){return e.m},isIE:function(){return o.w},random:function(){return n.M}});var n=r(9054),t=r(3354),e=r(6957),o=r(1756),u=r(1773),f=r(4768),c=r(8702),a=r(5720),s={stringify:function(n){for(var t=n.words,r=n.nSigBytes,i=[],e=0;e>>2]>>>16-e%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var r=n.length,i=[],e=0;e>>1]|=n.charCodeAt(e)<<16-e%2*16;return new t.e(i,2*r)}};function h(n){return n<<8&4278255360|n>>>8&16711935}var v,w={stringify:function(n){for(var t=n.words,r=n.nSigBytes,i=[],e=0;e>>2]>>>16-e%4*8&65535);i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var r=n.length,i=[],e=0;e>>1]|=h(n.charCodeAt(e)<<16-e%2*16);return new t.e(i,2*r)}},d=s,b=r(2214),l=r(7008),y=r(670),p=r(9541),m=(v=function(n,t){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}v(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),g=function(n){function r(t){var r=n.call(this,t)||this;return r.H=4,r.T=y.MD5,r.K=1,t&&(r.H=void 0!==t.keySize?t.keySize:r.H,r.T=void 0!==t.Hasher?t.Hasher:r.T,r.K=void 0!==t.iterations?t.iterations:r.K),r}return m(r,n),r.prototype.compute=function(n,r){for(var i,e=new this.T,o=new t.e,u=o.words,f=this.H,c=this.K;u.lengthe&&(t=n.finalize(t)),t.clamp();for(var o=this.i=t.clone(),u=this.u=t.clone(),f=o.words,c=u.words,a=0;a>>32-o)+t}function a(n,t,r,i,e,o,u){var f=n+(t&i|r&~i)+e+u;return(f<>>32-o)+t}function s(n,t,r,i,e,o,u){var f=n+(t^r^i)+e+u;return(f<>>32-o)+t}function h(n,t,r,i,e,o,u){var f=n+(r^(t|~i))+e+u;return(f<>>32-o)+t}!function(){for(var n=0;n<64;n++)f[n]=4294967296*Math.abs(Math.sin(n+1))|0}();var v=function(n){function t(t){var r=n.call(this,t)||this;return r.h=new e.e([1732584193,4023233417,2562383102,271733878]),t&&void 0!==t.hash&&(r.h=t.hash.clone()),r}return u(t,n),t.prototype.v=function(){this.h=new e.e([1732584193,4023233417,2562383102,271733878])},t.prototype.l=function(n,t){for(var r=0;r<16;r++){var i=t+r,e=n[i];n[i]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8)}var o=this.h.words,u=n[t],v=n[t+1],w=n[t+2],d=n[t+3],l=n[t+4],b=n[t+5],y=n[t+6],p=n[t+7],m=n[t+8],g=n[t+9],j=n[t+10],O=n[t+11],A=n[t+12],_=n[t+13],E=n[t+14],M=n[t+15],S=o[0],U=o[1],I=o[2],x=o[3];S=c(S,U,I,x,u,7,f[0]),x=c(x,S,U,I,v,12,f[1]),I=c(I,x,S,U,w,17,f[2]),U=c(U,I,x,S,d,22,f[3]),S=c(S,U,I,x,l,7,f[4]),x=c(x,S,U,I,b,12,f[5]),I=c(I,x,S,U,y,17,f[6]),U=c(U,I,x,S,p,22,f[7]),S=c(S,U,I,x,m,7,f[8]),x=c(x,S,U,I,g,12,f[9]),I=c(I,x,S,U,j,17,f[10]),U=c(U,I,x,S,O,22,f[11]),S=c(S,U,I,x,A,7,f[12]),x=c(x,S,U,I,_,12,f[13]),I=c(I,x,S,U,E,17,f[14]),S=a(S,U=c(U,I,x,S,M,22,f[15]),I,x,v,5,f[16]),x=a(x,S,U,I,y,9,f[17]),I=a(I,x,S,U,O,14,f[18]),U=a(U,I,x,S,u,20,f[19]),S=a(S,U,I,x,b,5,f[20]),x=a(x,S,U,I,j,9,f[21]),I=a(I,x,S,U,M,14,f[22]),U=a(U,I,x,S,l,20,f[23]),S=a(S,U,I,x,g,5,f[24]),x=a(x,S,U,I,E,9,f[25]),I=a(I,x,S,U,d,14,f[26]),U=a(U,I,x,S,m,20,f[27]),S=a(S,U,I,x,_,5,f[28]),x=a(x,S,U,I,w,9,f[29]),I=a(I,x,S,U,p,14,f[30]),S=s(S,U=a(U,I,x,S,A,20,f[31]),I,x,b,4,f[32]),x=s(x,S,U,I,m,11,f[33]),I=s(I,x,S,U,O,16,f[34]),U=s(U,I,x,S,E,23,f[35]),S=s(S,U,I,x,v,4,f[36]),x=s(x,S,U,I,l,11,f[37]),I=s(I,x,S,U,p,16,f[38]),U=s(U,I,x,S,j,23,f[39]),S=s(S,U,I,x,_,4,f[40]),x=s(x,S,U,I,u,11,f[41]),I=s(I,x,S,U,d,16,f[42]),U=s(U,I,x,S,y,23,f[43]),S=s(S,U,I,x,g,4,f[44]),x=s(x,S,U,I,A,11,f[45]),I=s(I,x,S,U,M,16,f[46]),S=h(S,U=s(U,I,x,S,w,23,f[47]),I,x,u,6,f[48]),x=h(x,S,U,I,p,10,f[49]),I=h(I,x,S,U,E,15,f[50]),U=h(U,I,x,S,b,21,f[51]),S=h(S,U,I,x,A,6,f[52]),x=h(x,S,U,I,d,10,f[53]),I=h(I,x,S,U,j,15,f[54]),U=h(U,I,x,S,v,21,f[55]),S=h(S,U,I,x,m,6,f[56]),x=h(x,S,U,I,M,10,f[57]),I=h(I,x,S,U,y,15,f[58]),U=h(U,I,x,S,_,21,f[59]),S=h(S,U,I,x,l,6,f[60]),x=h(x,S,U,I,O,10,f[61]),I=h(I,x,S,U,w,15,f[62]),U=h(U,I,x,S,g,21,f[63]),o[0]=o[0]+S|0,o[1]=o[1]+U|0,o[2]=o[2]+I|0,o[3]=o[3]+x|0},t.prototype.j=function(){var n=this.O,t=n.words,r=8*this.A,i=8*n.nSigBytes;t[i>>>5]|=128<<24-i%32;var e=Math.floor(r/4294967296),o=r;t[15+(i+64>>>9<<4)]=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),t[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n.nSigBytes=4*(t.length+1),this.S();for(var u=this.h,f=u.words,c=0;c<4;c++){var a=f[c];f[c]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return u},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.U,data:this.O,nBytes:this.A})},t.hash=function(n){return(new t).finalize(n)},t}(o.P)},5561:function(n,t,r){r.d(t,{SHA256:function(){return v}});var i,e=r(1868),o=r(3354),u=(i=function(n,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}i(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),f=[],c=[];function a(n){for(var t=Math.sqrt(n),r=2;r<=t;r++)if(!(n%r))return!1;return!0}function s(n){return 4294967296*(n-(0|n))|0}!function(){for(var n=2,t=0;t<64;)a(n)&&(t<8&&(f[t]=s(Math.pow(n,.5))),c[t]=s(Math.pow(n,1/3)),t++),n++}();var h=[],v=function(n){function t(t){var r=n.call(this,t)||this;return r.h=new o.e(f.slice(0)),r.I=t,t&&void 0!==t.hash&&(r.h=t.hash.clone()),r}return u(t,n),t.prototype.v=function(){this.h=new o.e(f.slice(0))},t.prototype.l=function(n,t){for(var r=this.h.words,i=r[0],e=r[1],o=r[2],u=r[3],f=r[4],a=r[5],s=r[6],v=r[7],w=0;w<64;w++){if(w<16)h[w]=0|n[t+w];else{var d=h[w-15],l=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,b=h[w-2],y=(b<<15|b>>>17)^(b<<13|b>>>19)^b>>>10;h[w]=l+h[w-7]+y+h[w-16]}var p=i&e^i&o^e&o,m=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),g=v+((f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25))+(f&a^~f&s)+c[w]+h[w];v=s,s=a,a=f,f=u+g|0,u=o,o=e,e=i,i=g+(m+p)|0}r[0]=r[0]+i|0,r[1]=r[1]+e|0,r[2]=r[2]+o|0,r[3]=r[3]+u|0,r[4]=r[4]+f|0,r[5]=r[5]+a|0,r[6]=r[6]+s|0,r[7]=r[7]+v|0},t.prototype.j=function(){var n=this.O.words,t=8*this.A,r=8*this.O.nSigBytes;return n[r>>>5]|=128<<24-r%32,n[14+(r+64>>>9<<4)]=Math.floor(t/4294967296),n[15+(r+64>>>9<<4)]=t,this.O.nSigBytes=4*n.length,this.S(),this.h},t.prototype.clone=function(){return new t({hash:this.h,blockSize:this.U,data:this.O,nBytes:this.A})},t.hash=function(n,r){return new t(r).finalize(n)},t}(e.P)},3354:function(n,t,r){r.d(t,{e:function(){return o}});var i=r(5720),e=r(9054),o=function(){function n(t,r){if(Array.isArray(t)||!t)return this.N=Array.isArray(t)?t:[],void(this.B="number"==typeof r?r:4*this.N.length);if(t instanceof n)return this.N=t.words.slice(),void(this.B=t.nSigBytes);var i;try{t instanceof ArrayBuffer?i=new Uint8Array(t):(t instanceof Uint8Array||t instanceof Int8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}catch(n){throw new Error("Invalid argument")}if(!i)throw new Error("Invalid argument");for(var e=i.byteLength,o=[],u=0;u>>2]|=i[u]<<24-u%4*8;this.N=o,this.B=e}return Object.defineProperty(n.prototype,"nSigBytes",{get:function(){return this.B},set:function(n){this.B=n},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"words",{get:function(){return this.N},enumerable:!1,configurable:!0}),n.prototype.toString=function(n){return n?n.stringify(this):i.p.stringify(this)},n.prototype.toUint8Array=function(){for(var n=this.N,t=this.B,r=new Uint8Array(t),i=0;i>>2]>>>24-i%4*8&255;return r},n.prototype.concat=function(n){var t=n.words.slice(),r=n.nSigBytes;if(this.clamp(),this.B%4)for(var i=0;i>>2]>>>24-i%4*8&255;this.N[this.B+i>>>2]|=e<<24-(this.B+i)%4*8}else for(i=0;i>>2]=t[i>>>2];return this.B+=r,this},n.prototype.clamp=function(){var n=this.B;this.N[n>>>2]&=4294967295<<32-n%4*8,this.N.length=Math.ceil(n/4)},n.prototype.clone=function(){return new n(this.N.slice(),this.B)},n.random=function(t){for(var r=[],i=0;i"===n?o>t:">="===n?o>=t:o===t))}},1773:function(n,t,r){r.d(t,{D:function(){return f}});for(var i=r(3354),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[],u=0;u>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,f=0;f<4&&o+.75*f>>6*(3-f)&63));var c=e.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(n){var t=n.length,r=e.charAt(64);if(r){var u=n.indexOf(r);-1!==u&&(t=u)}for(var f=[],c=0,a=0;a>>6-a%4*2;f[c>>>2]|=s<<24-c%4*8,c++}return new i.e(f,c)}}},5720:function(n,t,r){r.d(t,{p:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(n){var t=n.length;if(t%2!=0)throw new Error("Hex string count must be even");if(!/^[a-fA-F0-9]+$/.test(n))throw new Error("Invalid Hex string: "+n);for(var r=[],e=0;e>>3]|=parseInt(n.substr(e,2),16)<<24-e%8*4;return new i.e(r,t/2)}}},8702:function(n,t,r){r.d(t,{m:function(){return e}});var i=r(3354),e={stringify:function(n){for(var t=n.nSigBytes,r=n.words,i=[],e=0;e>>2]>>>24-e%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var t=n.length,r=[],e=0;e>>2]|=(255&n.charCodeAt(e))<<24-e%4*8;return new i.e(r,t)}}},4768:function(n,t,r){r.d(t,{d:function(){return e}});var i=r(8702),e={stringify:function(n){try{return decodeURIComponent(escape(i.m.stringify(n)))}catch(n){throw new Error("Malformed UTF-8 data")}},parse:function(n){return i.m.parse(unescape(encodeURIComponent(n)))}}},9054:function(n,t,r){r.d(t,{M:function(){return e}});var i=r(1756);var e=function(){if("undefined"!=typeof window){var n=window.crypto||window.msCrypto;if(!n){if((0,i.w)("<",11))return console.warn("IE <= 10 uses insecure random generator. Please consider to use IE11 or another modern browser"),function(){return Math.floor(512*Math.random())%256};throw new Error("Crypto module not found")}return function(){return n.getRandomValues(new Uint32Array(1))[0]}}return void 0!==r.g&&r.g.crypto?function(){return r.g.crypto.randomBytes(4).readInt32LE()}:function(){return require("crypto").randomBytes(4).readInt32LE()}}()}},t={};function r(i){var e=t[i];if(void 0!==e)return e.exports;var o=t[i]={exports:{}};return n[i](o,o.exports,r),o.exports}r.d=function(n,t){for(var i in t)r.o(t,i)&&!r.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"L",{value:!0})};var i={};return function(){r.r(i),r.d(i,{Base64:function(){return u.D},EvpKDF:function(){return g},Hex:function(){return a.p},Latin1:function(){return c.m},OpenSSLKDF:function(){return l.s},PBKDF2:function(){return b.E},Utf16:function(){return d},Utf16BE:function(){return s},Utf16LE:function(){return w},Utf8:function(){return f.d},Word32Array:function(){return t.e},Word64:function(){return e.r},Word64Array:function(){return e.m},isIE:function(){return o.w},random:function(){return n.M}});var n=r(9054),t=r(3354),e=r(6957),o=r(1756),u=r(1773),f=r(4768),c=r(8702),a=r(5720),s={stringify:function(n){for(var t=n.words,r=n.nSigBytes,i=[],e=0;e>>2]>>>16-e%4*8&65535;i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var r=n.length,i=[],e=0;e>>1]|=n.charCodeAt(e)<<16-e%2*16;return new t.e(i,2*r)}};function h(n){return n<<8&4278255360|n>>>8&16711935}var v,w={stringify:function(n){for(var t=n.words,r=n.nSigBytes,i=[],e=0;e>>2]>>>16-e%4*8&65535);i.push(String.fromCharCode(o))}return i.join("")},parse:function(n){for(var r=n.length,i=[],e=0;e>>1]|=h(n.charCodeAt(e)<<16-e%2*16);return new t.e(i,2*r)}},d=s,l=r(2214),b=r(7008),y=r(670),p=r(9541),m=(v=function(n,t){return(v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])})(n,t)},function(n,t){function r(){this.constructor=n}v(n,t),n.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),g=function(n){function r(t){var r=n.call(this,t)||this;return r.H=4,r.T=y.MD5,r.K=1,t&&(r.H=void 0!==t.keySize?t.keySize:r.H,r.T=void 0!==t.Hasher?t.Hasher:r.T,r.K=void 0!==t.iterations?t.iterations:r.K),r}return m(r,n),r.prototype.compute=function(n,r){for(var i,e=new this.T,o=new t.e,u=o.words,f=this.H,c=this.K;u.length", "license": "MIT", diff --git a/package.json b/package.json index 1e464d8..0bbc1e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jscrypto", - "version": "1.0.1", + "version": "1.0.2", "main": "./index.js", "author": "Izumi Hoshino ", "license": "MIT", diff --git a/src/lib/encoder/Hex.ts b/src/lib/encoder/Hex.ts index 5b01303..99a603b 100644 --- a/src/lib/encoder/Hex.ts +++ b/src/lib/encoder/Hex.ts @@ -37,6 +37,9 @@ export const Hex: IEncoder = { if(Len % 2 !== 0){ throw new Error("Hex string count must be even"); } + else if(!/^[a-fA-F0-9]+$/.test(hexStr)){ + throw new Error(`Invalid Hex string: ${hexStr}`); + } const words: number[] = []; for(let i=0;i Hex.parse("1g")).to.throwException(/^Invalid Hex string: 1g$/); + }); });