From 7c5188e984ff5987806fc50cd78310bb7a87454b Mon Sep 17 00:00:00 2001 From: Magic Len Date: Sun, 16 Apr 2023 10:48:03 +0800 Subject: [PATCH] downgrade Long --- dist/short-crypt.min.js | 2 +- package.json | 2 +- pnpm-lock.yaml | 8 ++++---- src/crc64_we.ts | 2 +- webpack.config.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/short-crypt.min.js b/dist/short-crypt.min.js index 642f051..0b4722a 100644 --- a/dist/short-crypt.min.js +++ b/dist/short-crypt.min.js @@ -1 +1 @@ -!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,(()=>(()=>{"use strict";var e={556:(e,n)=>{function t(e,n,t){var r;if(void 0===t&&(t={}),!n.codes){n.codes={};for(var i=0;i=8&&(h-=8,s[a++]=255&u>>h)}if(h>=n.bits||255&u<<8-h)throw new SyntaxError("Unexpected end of data");return s}function r(e,n,t){void 0===t&&(t={});for(var r=t.pad,i=void 0===r||r,o=(1<n.bits;)h-=n.bits,s+=n.chars[o&u>>h];if(h&&(s+=n.chars[o&u<{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{t.r(r),t.d(r,{ShortCrypt:()=>X});var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function n(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function i(e){return!0===(e&&e.__isLong__)}function o(e){var n=Math.clz32(e&-e);return e?31-n:n}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=i;var s={},h={};function u(e,n){var t,r,i;return n?(i=0<=(e>>>=0)&&e<256)&&(r=h[e])?r:(t=w(e,0,!0),i&&(h[e]=t),t):(i=-128<=(e|=0)&&e<128)&&(r=s[e])?r:(t=w(e,e<0?-1:0,!1),i&&(s[e]=t),t)}function a(e,n){if(isNaN(e))return n?b:m;if(n){if(e<0)return b;if(e>=d)return N}else{if(e<=-y)return C;if(e+1>=y)return S}return e<0?a(-e,n).neg():w(e%l|0,e/l|0,n)}function w(e,t,r){return new n(e,t,r)}n.fromInt=u,n.fromNumber=a,n.fromBits=w;var f=Math.pow;function c(e,n,t){if(0===e.length)throw Error("empty string");if("number"==typeof n?(t=n,n=!1):n=!!n,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return n?b:m;if((t=t||10)<2||360)throw Error("interior hyphen");if(0===r)return c(e.substring(1),n,t).neg();for(var i=a(f(t,8)),o=m,s=0;s>>0:this.low},O.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},O.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=h).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},O.getHighBits=function(){return this.high},O.getHighBitsUnsigned=function(){return this.high>>>0},O.getLowBits=function(){return this.low},O.getLowBitsUnsigned=function(){return this.low>>>0},O.getNumBitsAbs=function(){if(this.isNegative())return this.eq(C)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,n=31;n>0&&0==(e&1<=0},O.isOdd=function(){return 1==(1&this.low)},O.isEven=function(){return 0==(1&this.low)},O.equals=function(e){return i(e)||(e=g(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},O.eq=O.equals,O.notEquals=function(e){return!this.eq(e)},O.neq=O.notEquals,O.ne=O.notEquals,O.lessThan=function(e){return this.comp(e)<0},O.lt=O.lessThan,O.lessThanOrEqual=function(e){return this.comp(e)<=0},O.lte=O.lessThanOrEqual,O.le=O.lessThanOrEqual,O.greaterThan=function(e){return this.comp(e)>0},O.gt=O.greaterThan,O.greaterThanOrEqual=function(e){return this.comp(e)>=0},O.gte=O.greaterThanOrEqual,O.ge=O.greaterThanOrEqual,O.compare=function(e){if(i(e)||(e=g(e)),this.eq(e))return 0;var n=this.isNegative(),t=e.isNegative();return n&&!t?-1:!n&&t?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},O.comp=O.compare,O.negate=function(){return!this.unsigned&&this.eq(C)?C:this.not().add(p)},O.neg=O.negate,O.add=function(e){i(e)||(e=g(e));var n=this.high>>>16,t=65535&this.high,r=this.low>>>16,o=65535&this.low,s=e.high>>>16,h=65535&e.high,u=e.low>>>16,a=0,f=0,c=0,l=0;return c+=(l+=o+(65535&e.low))>>>16,f+=(c+=r+u)>>>16,a+=(f+=t+h)>>>16,a+=n+s,w((c&=65535)<<16|(l&=65535),(a&=65535)<<16|(f&=65535),this.unsigned)},O.subtract=function(e){return i(e)||(e=g(e)),this.add(e.neg())},O.sub=O.subtract,O.multiply=function(n){if(this.isZero())return this;if(i(n)||(n=g(n)),e)return w(e.mul(this.low,this.high,n.low,n.high),e.get_high(),this.unsigned);if(n.isZero())return this.unsigned?b:m;if(this.eq(C))return n.isOdd()?C:m;if(n.eq(C))return this.isOdd()?C:m;if(this.isNegative())return n.isNegative()?this.neg().mul(n.neg()):this.neg().mul(n).neg();if(n.isNegative())return this.mul(n.neg()).neg();if(this.lt(v)&&n.lt(v))return a(this.toNumber()*n.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,o=this.low>>>16,s=65535&this.low,h=n.high>>>16,u=65535&n.high,f=n.low>>>16,c=65535&n.low,l=0,d=0,y=0,p=0;return y+=(p+=s*c)>>>16,d+=(y+=o*c)>>>16,y&=65535,d+=(y+=s*f)>>>16,l+=(d+=r*c)>>>16,d&=65535,l+=(d+=o*f)>>>16,d&=65535,l+=(d+=s*u)>>>16,l+=t*c+r*f+o*u+s*h,w((y&=65535)<<16|(p&=65535),(l&=65535)<<16|(d&=65535),this.unsigned)},O.mul=O.multiply,O.divide=function(n){if(i(n)||(n=g(n)),n.isZero())throw Error("division by zero");var t,r,o;if(e)return this.unsigned||-2147483648!==this.high||-1!==n.low||-1!==n.high?w((this.unsigned?e.div_u:e.div_s)(this.low,this.high,n.low,n.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?b:m;if(this.unsigned){if(n.unsigned||(n=n.toUnsigned()),n.gt(this))return b;if(n.gt(this.shru(1)))return E;o=b}else{if(this.eq(C))return n.eq(p)||n.eq(A)?C:n.eq(C)?p:(t=this.shr(1).div(n).shl(1)).eq(m)?n.isNegative()?p:A:(r=this.sub(n.mul(t)),o=t.add(r.div(n)));if(n.eq(C))return this.unsigned?b:m;if(this.isNegative())return n.isNegative()?this.neg().div(n.neg()):this.neg().div(n).neg();if(n.isNegative())return this.div(n.neg()).neg();o=m}for(r=this;r.gte(n);){t=Math.max(1,Math.floor(r.toNumber()/n.toNumber()));for(var s=Math.ceil(Math.log(t)/Math.LN2),h=s<=48?1:f(2,s-48),u=a(t),c=u.mul(n);c.isNegative()||c.gt(r);)c=(u=a(t-=h,this.unsigned)).mul(n);u.isZero()&&(u=p),o=o.add(u),r=r.sub(c)}return o},O.div=O.divide,O.modulo=function(n){return i(n)||(n=g(n)),e?w((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,n.low,n.high),e.get_high(),this.unsigned):this.sub(this.div(n).mul(n))},O.mod=O.modulo,O.rem=O.modulo,O.not=function(){return w(~this.low,~this.high,this.unsigned)},O.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},O.clz=O.countLeadingZeros,O.countTrailingZeros=function(){return this.low?o(this.low):o(this.high)+32},O.ctz=O.countTrailingZeros,O.and=function(e){return i(e)||(e=g(e)),w(this.low&e.low,this.high&e.high,this.unsigned)},O.or=function(e){return i(e)||(e=g(e)),w(this.low|e.low,this.high|e.high,this.unsigned)},O.xor=function(e){return i(e)||(e=g(e)),w(this.low^e.low,this.high^e.high,this.unsigned)},O.shiftLeft=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?w(this.low<>>32-e,this.unsigned):w(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):w(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},O.shr=O.shiftRight,O.shiftRightUnsigned=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?w(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):w(32===e?this.high:this.high>>>e-32,0,this.unsigned)},O.shru=O.shiftRightUnsigned,O.shr_u=O.shiftRightUnsigned,O.rotateLeft=function(e){var n;return i(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?w(this.high,this.low,this.unsigned):e<32?(n=32-e,w(this.low<>>n,this.high<>>n,this.unsigned)):(n=32-(e-=32),w(this.high<>>n,this.low<>>n,this.unsigned))},O.rotl=O.rotateLeft,O.rotateRight=function(e){var n;return i(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?w(this.high,this.low,this.unsigned):e<32?(n=32-e,w(this.high<>>e,this.low<>>e,this.unsigned)):(n=32-(e-=32),w(this.low<>>e,this.high<>>e,this.unsigned))},O.rotr=O.rotateRight,O.toSigned=function(){return this.unsigned?w(this.low,this.high,!1):this},O.toUnsigned=function(){return this.unsigned?this:w(this.low,this.high,!0)},O.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},O.toBytesLE=function(){var e=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},O.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,n>>>24,n>>>16&255,n>>>8&255,255&n]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};const T=n;var U=t(556);U.YU;const x=U.pJ,B=(U.eV,U.US,U.tH);U.Y2;function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function R(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t31)return!1;var i=n,o=i.length,s=new Uint8Array(o),h=t,u=T.fromNumber(t,!0);i.forEach((function(e){h^=e,u=u.add(T.fromNumber(e,!0))}));var a=new j;a.digest(new Uint8Array([h].concat(V(u.toBytesBE()))));for(var w=a.getByteArray(),f=[],c=0;c=10&&n<36?n-10+"A".charCodeAt(0):n>=36&&n<62?n-36+"a".charCodeAt(0):62===n?"-".charCodeAt(0):"_".charCodeAt(0),i=t.body,o=String.fromCharCode(r),s=B.stringify(i,{pad:!1}),h=(new TextEncoder).encode(s),u=h.length,a=T.fromNumber(r);h.forEach((function(e){a=a.add(T.fromNumber(e,!0))}));var w=this.keySumRev.xor(a).mod(u+1).toNumber();return s.substring(0,w)+o+s.substring(w,u)}},{key:"decryptURLComponent",value:function(e){var n=(new TextEncoder).encode(e),t=n.length;if(t<1)return!1;var r=T.UZERO;n.forEach((function(e){r=r.add(T.fromNumber(e,!0))}));var i,o=this.keySumRev.xor(r).mod(t).toNumber(),s=(i=n[o])>="0".charCodeAt(0)&&i<="9".charCodeAt(0)?i-"0".charCodeAt(0):i>="A".charCodeAt(0)&&i<="Z".charCodeAt(0)?i+10-"A".charCodeAt(0):i>="a".charCodeAt(0)&&i<="z".charCodeAt(0)?i+36-"a".charCodeAt(0):i==="-".charCodeAt(0)?62:63;if(s<0||s>31)return!1;var h=e.slice(0,o)+e.slice(o+1,t);try{var u=B.parse(h,{out:Uint8Array,loose:!0});return this.decrypt(s,u)}catch(e){return!1}}},{key:"encryptToQRCodeAlphanumeric",value:function(e){"string"==typeof e&&(e=(new TextEncoder).encode(e));var n,t=this.encrypt(e),r=(n=t.base)<10?n+"0".charCodeAt(0):n-10+"A".charCodeAt(0),i=t.body,o=String.fromCharCode(r),s=x.stringify(i,{pad:!1}),h=(new TextEncoder).encode(s),u=h.length,a=T.fromNumber(r,!0);h.forEach((function(e){a=a.add(T.fromNumber(e,!0))}));var w=this.keySumRev.xor(a).mod(u+1).toNumber();return s.substring(0,w)+o+s.substring(w,u)}},{key:"decryptQRCodeAlphanumeric",value:function(e){var n=(new TextEncoder).encode(e),t=n.length;if(t<1)return!1;var r=T.UZERO;n.forEach((function(e){r=r.add(T.fromNumber(e,!0))}));var i,o=this.keySumRev.xor(r).mod(t).toNumber(),s=(i=n[o])>="0".charCodeAt(0)&&i<="9".charCodeAt(0)?i-"0".charCodeAt(0):i+10-"A".charCodeAt(0);if(s<0||s>31)return!1;var h=e.slice(0,o)+e.slice(o+1,t);try{var u=x.parse(h,{out:Uint8Array,loose:!0});return this.decrypt(s,u)}catch(e){return!1}}}])&&H(n.prototype,t),r&&H(n,r),Object.defineProperty(n,"prototype",{writable:!1}),e}()})(),r})())); \ No newline at end of file +!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(self,(()=>(()=>{"use strict";var e={356:(e,n)=>{function t(e,n,t){var r;if(void 0===t&&(t={}),!n.codes){n.codes={};for(var i=0;i=8&&(h-=8,s[a++]=255&u>>h)}if(h>=n.bits||255&u<<8-h)throw new SyntaxError("Unexpected end of data");return s}function r(e,n,t){void 0===t&&(t={});for(var r=t.pad,i=void 0===r||r,o=(1<n.bits;)h-=n.bits,s+=n.chars[o&u>>h];if(h&&(s+=n.chars[o&u<{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{t.r(r),t.d(r,{ShortCrypt:()=>X});var e=null;try{e=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function n(e,n,t){this.low=0|e,this.high=0|n,this.unsigned=!!t}function i(e){return!0===(e&&e.__isLong__)}function o(e){var n=Math.clz32(e&-e);return e?31-n:n}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=i;var s={},h={};function u(e,n){var t,r,i;return n?(i=0<=(e>>>=0)&&e<256)&&(r=h[e])?r:(t=w(e,0,!0),i&&(h[e]=t),t):(i=-128<=(e|=0)&&e<128)&&(r=s[e])?r:(t=w(e,e<0?-1:0,!1),i&&(s[e]=t),t)}function a(e,n){if(isNaN(e))return n?b:m;if(n){if(e<0)return b;if(e>=d)return N}else{if(e<=-y)return C;if(e+1>=y)return S}return e<0?a(-e,n).neg():w(e%l|0,e/l|0,n)}function w(e,t,r){return new n(e,t,r)}n.fromInt=u,n.fromNumber=a,n.fromBits=w;var f=Math.pow;function c(e,n,t){if(0===e.length)throw Error("empty string");if("number"==typeof n?(t=n,n=!1):n=!!n,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return n?b:m;if((t=t||10)<2||360)throw Error("interior hyphen");if(0===r)return c(e.substring(1),n,t).neg();for(var i=a(f(t,8)),o=m,s=0;s>>0:this.low},O.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},O.toString=function(e){if((e=e||10)<2||36>>0).toString(e);if((o=h).isZero())return u+s;for(;u.length<6;)u="0"+u;s=""+u+s}},O.getHighBits=function(){return this.high},O.getHighBitsUnsigned=function(){return this.high>>>0},O.getLowBits=function(){return this.low},O.getLowBitsUnsigned=function(){return this.low>>>0},O.getNumBitsAbs=function(){if(this.isNegative())return this.eq(C)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,n=31;n>0&&0==(e&1<=0},O.isOdd=function(){return 1==(1&this.low)},O.isEven=function(){return 0==(1&this.low)},O.equals=function(e){return i(e)||(e=g(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},O.eq=O.equals,O.notEquals=function(e){return!this.eq(e)},O.neq=O.notEquals,O.ne=O.notEquals,O.lessThan=function(e){return this.comp(e)<0},O.lt=O.lessThan,O.lessThanOrEqual=function(e){return this.comp(e)<=0},O.lte=O.lessThanOrEqual,O.le=O.lessThanOrEqual,O.greaterThan=function(e){return this.comp(e)>0},O.gt=O.greaterThan,O.greaterThanOrEqual=function(e){return this.comp(e)>=0},O.gte=O.greaterThanOrEqual,O.ge=O.greaterThanOrEqual,O.compare=function(e){if(i(e)||(e=g(e)),this.eq(e))return 0;var n=this.isNegative(),t=e.isNegative();return n&&!t?-1:!n&&t?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},O.comp=O.compare,O.negate=function(){return!this.unsigned&&this.eq(C)?C:this.not().add(p)},O.neg=O.negate,O.add=function(e){i(e)||(e=g(e));var n=this.high>>>16,t=65535&this.high,r=this.low>>>16,o=65535&this.low,s=e.high>>>16,h=65535&e.high,u=e.low>>>16,a=0,f=0,c=0,l=0;return c+=(l+=o+(65535&e.low))>>>16,f+=(c+=r+u)>>>16,a+=(f+=t+h)>>>16,a+=n+s,w((c&=65535)<<16|(l&=65535),(a&=65535)<<16|(f&=65535),this.unsigned)},O.subtract=function(e){return i(e)||(e=g(e)),this.add(e.neg())},O.sub=O.subtract,O.multiply=function(n){if(this.isZero())return this;if(i(n)||(n=g(n)),e)return w(e.mul(this.low,this.high,n.low,n.high),e.get_high(),this.unsigned);if(n.isZero())return this.unsigned?b:m;if(this.eq(C))return n.isOdd()?C:m;if(n.eq(C))return this.isOdd()?C:m;if(this.isNegative())return n.isNegative()?this.neg().mul(n.neg()):this.neg().mul(n).neg();if(n.isNegative())return this.mul(n.neg()).neg();if(this.lt(v)&&n.lt(v))return a(this.toNumber()*n.toNumber(),this.unsigned);var t=this.high>>>16,r=65535&this.high,o=this.low>>>16,s=65535&this.low,h=n.high>>>16,u=65535&n.high,f=n.low>>>16,c=65535&n.low,l=0,d=0,y=0,p=0;return y+=(p+=s*c)>>>16,d+=(y+=o*c)>>>16,y&=65535,d+=(y+=s*f)>>>16,l+=(d+=r*c)>>>16,d&=65535,l+=(d+=o*f)>>>16,d&=65535,l+=(d+=s*u)>>>16,l+=t*c+r*f+o*u+s*h,w((y&=65535)<<16|(p&=65535),(l&=65535)<<16|(d&=65535),this.unsigned)},O.mul=O.multiply,O.divide=function(n){if(i(n)||(n=g(n)),n.isZero())throw Error("division by zero");var t,r,o;if(e)return this.unsigned||-2147483648!==this.high||-1!==n.low||-1!==n.high?w((this.unsigned?e.div_u:e.div_s)(this.low,this.high,n.low,n.high),e.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?b:m;if(this.unsigned){if(n.unsigned||(n=n.toUnsigned()),n.gt(this))return b;if(n.gt(this.shru(1)))return E;o=b}else{if(this.eq(C))return n.eq(p)||n.eq(A)?C:n.eq(C)?p:(t=this.shr(1).div(n).shl(1)).eq(m)?n.isNegative()?p:A:(r=this.sub(n.mul(t)),o=t.add(r.div(n)));if(n.eq(C))return this.unsigned?b:m;if(this.isNegative())return n.isNegative()?this.neg().div(n.neg()):this.neg().div(n).neg();if(n.isNegative())return this.div(n.neg()).neg();o=m}for(r=this;r.gte(n);){t=Math.max(1,Math.floor(r.toNumber()/n.toNumber()));for(var s=Math.ceil(Math.log(t)/Math.LN2),h=s<=48?1:f(2,s-48),u=a(t),c=u.mul(n);c.isNegative()||c.gt(r);)c=(u=a(t-=h,this.unsigned)).mul(n);u.isZero()&&(u=p),o=o.add(u),r=r.sub(c)}return o},O.div=O.divide,O.modulo=function(n){return i(n)||(n=g(n)),e?w((this.unsigned?e.rem_u:e.rem_s)(this.low,this.high,n.low,n.high),e.get_high(),this.unsigned):this.sub(this.div(n).mul(n))},O.mod=O.modulo,O.rem=O.modulo,O.not=function(){return w(~this.low,~this.high,this.unsigned)},O.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},O.clz=O.countLeadingZeros,O.countTrailingZeros=function(){return this.low?o(this.low):o(this.high)+32},O.ctz=O.countTrailingZeros,O.and=function(e){return i(e)||(e=g(e)),w(this.low&e.low,this.high&e.high,this.unsigned)},O.or=function(e){return i(e)||(e=g(e)),w(this.low|e.low,this.high|e.high,this.unsigned)},O.xor=function(e){return i(e)||(e=g(e)),w(this.low^e.low,this.high^e.high,this.unsigned)},O.shiftLeft=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?w(this.low<>>32-e,this.unsigned):w(0,this.low<>>e|this.high<<32-e,this.high>>e,this.unsigned):w(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},O.shr=O.shiftRight,O.shiftRightUnsigned=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?w(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):w(32===e?this.high:this.high>>>e-32,0,this.unsigned)},O.shru=O.shiftRightUnsigned,O.shr_u=O.shiftRightUnsigned,O.rotateLeft=function(e){var n;return i(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?w(this.high,this.low,this.unsigned):e<32?(n=32-e,w(this.low<>>n,this.high<>>n,this.unsigned)):(n=32-(e-=32),w(this.high<>>n,this.low<>>n,this.unsigned))},O.rotl=O.rotateLeft,O.rotateRight=function(e){var n;return i(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?w(this.high,this.low,this.unsigned):e<32?(n=32-e,w(this.high<>>e,this.low<>>e,this.unsigned)):(n=32-(e-=32),w(this.low<>>e,this.high<>>e,this.unsigned))},O.rotr=O.rotateRight,O.toSigned=function(){return this.unsigned?w(this.low,this.high,!1):this},O.toUnsigned=function(){return this.unsigned?this:w(this.low,this.high,!0)},O.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},O.toBytesLE=function(){var e=this.high,n=this.low;return[255&n,n>>>8&255,n>>>16&255,n>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},O.toBytesBE=function(){var e=this.high,n=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,n>>>24,n>>>16&255,n>>>8&255,255&n]},n.fromBytes=function(e,t,r){return r?n.fromBytesLE(e,t):n.fromBytesBE(e,t)},n.fromBytesLE=function(e,t){return new n(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},n.fromBytesBE=function(e,t){return new n(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)};const T=n;var U=t(356);U.YU;const x=U.pJ,B=(U.eV,U.US,U.tH);U.Y2;function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function R(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t31)return!1;var i=n,o=i.length,s=new Uint8Array(o),h=t,u=T.fromNumber(t,!0);i.forEach((function(e){h^=e,u=u.add(T.fromNumber(e,!0))}));var a=new j;a.digest(new Uint8Array([h].concat(V(u.toBytesBE()))));for(var w=a.getByteArray(),f=[],c=0;c=10&&n<36?n-10+"A".charCodeAt(0):n>=36&&n<62?n-36+"a".charCodeAt(0):62===n?"-".charCodeAt(0):"_".charCodeAt(0),i=t.body,o=String.fromCharCode(r),s=B.stringify(i,{pad:!1}),h=(new TextEncoder).encode(s),u=h.length,a=T.fromNumber(r);h.forEach((function(e){a=a.add(T.fromNumber(e,!0))}));var w=this.keySumRev.xor(a).mod(u+1).toNumber();return s.substring(0,w)+o+s.substring(w,u)}},{key:"decryptURLComponent",value:function(e){var n=(new TextEncoder).encode(e),t=n.length;if(t<1)return!1;var r=T.UZERO;n.forEach((function(e){r=r.add(T.fromNumber(e,!0))}));var i,o=this.keySumRev.xor(r).mod(t).toNumber(),s=(i=n[o])>="0".charCodeAt(0)&&i<="9".charCodeAt(0)?i-"0".charCodeAt(0):i>="A".charCodeAt(0)&&i<="Z".charCodeAt(0)?i+10-"A".charCodeAt(0):i>="a".charCodeAt(0)&&i<="z".charCodeAt(0)?i+36-"a".charCodeAt(0):i==="-".charCodeAt(0)?62:63;if(s<0||s>31)return!1;var h=e.slice(0,o)+e.slice(o+1,t);try{var u=B.parse(h,{out:Uint8Array,loose:!0});return this.decrypt(s,u)}catch(e){return!1}}},{key:"encryptToQRCodeAlphanumeric",value:function(e){"string"==typeof e&&(e=(new TextEncoder).encode(e));var n,t=this.encrypt(e),r=(n=t.base)<10?n+"0".charCodeAt(0):n-10+"A".charCodeAt(0),i=t.body,o=String.fromCharCode(r),s=x.stringify(i,{pad:!1}),h=(new TextEncoder).encode(s),u=h.length,a=T.fromNumber(r,!0);h.forEach((function(e){a=a.add(T.fromNumber(e,!0))}));var w=this.keySumRev.xor(a).mod(u+1).toNumber();return s.substring(0,w)+o+s.substring(w,u)}},{key:"decryptQRCodeAlphanumeric",value:function(e){var n=(new TextEncoder).encode(e),t=n.length;if(t<1)return!1;var r=T.UZERO;n.forEach((function(e){r=r.add(T.fromNumber(e,!0))}));var i,o=this.keySumRev.xor(r).mod(t).toNumber(),s=(i=n[o])>="0".charCodeAt(0)&&i<="9".charCodeAt(0)?i-"0".charCodeAt(0):i+10-"A".charCodeAt(0);if(s<0||s>31)return!1;var h=e.slice(0,o)+e.slice(o+1,t);try{var u=x.parse(h,{out:Uint8Array,loose:!0});return this.decrypt(s,u)}catch(e){return!1}}}])&&H(n.prototype,t),r&&H(n,r),Object.defineProperty(n,"prototype",{writable:!1}),e}()})(),r})())); \ No newline at end of file diff --git a/package.json b/package.json index bfe376a..9d0e4d5 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ }, "homepage": "https://magiclen.org/short-crypt/", "dependencies": { - "long": "^5.2.2", + "long": "=5.2.1", "rfc4648": "^1.5.2" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0223448..1f9ee59 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,7 +12,7 @@ specifiers: babel-loader: ^9.1.2 eslint: ^8.38.0 jest: ^29.5.0 - long: ^5.2.2 + long: '=5.2.1' rfc4648: ^1.5.2 rimraf: ^5.0.0 terser-webpack-plugin: ^5.3.7 @@ -22,7 +22,7 @@ specifiers: webpack-cli: ^5.0.1 dependencies: - long: 5.2.2 + long: 5.2.1 rfc4648: 1.5.2 devDependencies: @@ -3671,8 +3671,8 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true - /long/5.2.2: - resolution: {integrity: sha512-FcRNYR7XWu4a9dHZfBTTpRy66IJgAg1dkRSQHQfrLKbTi8I7Awop0fUNqvcWPOSwu0/VX0CSDWlCcQz1LFUdoA==} + /long/5.2.1: + resolution: {integrity: sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==} dev: false /lru-cache/5.1.1: diff --git a/src/crc64_we.ts b/src/crc64_we.ts index 680bb5e..db24181 100644 --- a/src/crc64_we.ts +++ b/src/crc64_we.ts @@ -1,6 +1,6 @@ import Long from "long"; -export default class Crc64We { +export default class Crc64We { private lookupTable = [ new Long(0x0, 0x0), new Long(0xA9EA3693, 0x42F0E1EB), new Long(0x53D46D26, 0x85E1C3D7), new Long(0xFA3E5BB5, 0xC711223C), new Long(0xE42ECDF, 0x49336645), new Long(0xA7A8DA4C, 0xBC387AE), new Long(0x5D9681F9, 0xCCD2A592), new Long(0xF47CB76A, 0x8E224479), new Long(0x1C85D9BE, 0x9266CC8A), new Long(0xB56FEF2D, 0xD0962D61), new Long(0x4F51B498, 0x17870F5D), new Long(0xE6BB820B, 0x5577EEB6), new Long(0x12C73561, 0xDB55AACF), new Long(0xBB2D03F2, 0x99A54B24), new Long(0x41135847, 0x5EB46918), new Long(0xE8F96ED4, 0x1C4488F3), new Long(0x90E185EF, 0x663D78FF), new Long(0x390BB37C, 0x24CD9914), new Long(0xC335E8C9, 0xE3DCBB28), new Long(0x6ADFDE5A, 0xA12C5AC3), new Long(0x9EA36930, 0x2F0E1EBA), new Long(0x37495FA3, 0x6DFEFF51), new Long(0xCD770416, 0xAAEFDD6D), new Long(0x649D3285, 0xE81F3C86), new Long(0x8C645C51, 0xF45BB475), new Long(0x258E6AC2, 0xB6AB559E), new Long(0xDFB03177, 0x71BA77A2), new Long(0x765A07E4, 0x334A9649), new Long(0x8226B08E, 0xBD68D230), new Long(0x2BCC861D, 0xFF9833DB), new Long(0xD1F2DDA8, 0x388911E7), new Long(0x7818EB3B, 0x7A79F00C), new Long(0x21C30BDE, 0xCC7AF1FF), new Long(0x88293D4D, 0x8E8A1014), new Long(0x721766F8, 0x499B3228), new Long(0xDBFD506B, 0xB6BD3C3), new Long(0x2F81E701, 0x854997BA), new Long(0x866BD192, 0xC7B97651), new Long(0x7C558A27, 0xA8546D), new Long(0xD5BFBCB4, 0x4258B586), new Long(0x3D46D260, 0x5E1C3D75), new Long(0x94ACE4F3, 0x1CECDC9E), new Long(0x6E92BF46, 0xDBFDFEA2), new Long(0xC77889D5, 0x990D1F49), new Long(0x33043EBF, 0x172F5B30), new Long(0x9AEE082C, 0x55DFBADB), new Long(0x60D05399, 0x92CE98E7), new Long(0xC93A650A, 0xD03E790C), new Long(0xB1228E31, 0xAA478900), new Long(0x18C8B8A2, 0xE8B768EB), new Long(0xE2F6E317, 0x2FA64AD7), new Long(0x4B1CD584, 0x6D56AB3C), new Long(0xBF6062EE, 0xE374EF45), new Long(0x168A547D, 0xA1840EAE), new Long(0xECB40FC8, 0x66952C92), new Long(0x455E395B, 0x2465CD79), new Long(0xADA7578F, 0x3821458A), new Long(0x44D611C, 0x7AD1A461), new Long(0xFE733AA9, 0xBDC0865D), new Long(0x57990C3A, 0xFF3067B6), new Long(0xA3E5BB50, 0x711223CF), new Long(0xA0F8DC3, 0x33E2C224), new Long(0xF031D676, 0xF4F3E018), new Long(0x59DBE0E5, 0xB60301F3), new Long(0xEA6C212F, 0xDA050215), new Long(0x438617BC, 0x98F5E3FE), new Long(0xB9B84C09, 0x5FE4C1C2), new Long(0x10527A9A, 0x1D142029), new Long(0xE42ECDF0, 0x93366450), new Long(0x4DC4FB63, 0xD1C685BB), new Long(0xB7FAA0D6, 0x16D7A787), new Long(0x1E109645, 0x5427466C), new Long(0xF6E9F891, 0x4863CE9F), new Long(0x5F03CE02, 0xA932F74), new Long(0xA53D95B7, 0xCD820D48), new Long(0xCD7A324, 0x8F72ECA3), new Long(0xF8AB144E, 0x150A8DA), new Long(0x514122DD, 0x43A04931), new Long(0xAB7F7968, 0x84B16B0D), new Long(0x2954FFB, 0xC6418AE6), new Long(0x7A8DA4C0, 0xBC387AEA), new Long(0xD3679253, 0xFEC89B01), new Long(0x2959C9E6, 0x39D9B93D), new Long(0x80B3FF75, 0x7B2958D6), new Long(0x74CF481F, 0xF50B1CAF), new Long(0xDD257E8C, 0xB7FBFD44), new Long(0x271B2539, 0x70EADF78), new Long(0x8EF113AA, 0x321A3E93), new Long(0x66087D7E, 0x2E5EB660), new Long(0xCFE24BED, 0x6CAE578B), new Long(0x35DC1058, 0xABBF75B7), new Long(0x9C3626CB, 0xE94F945C), new Long(0x684A91A1, 0x676DD025), new Long(0xC1A0A732, 0x259D31CE), new Long(0x3B9EFC87, 0xE28C13F2), new Long(0x9274CA14, 0xA07CF219), new Long(0xCBAF2AF1, 0x167FF3EA), new Long(0x62451C62, 0x548F1201), new Long(0x987B47D7, 0x939E303D), new Long(0x31917144, 0xD16ED1D6), new Long(0xC5EDC62E, 0x5F4C95AF), new Long(0x6C07F0BD, 0x1DBC7444), new Long(0x9639AB08, 0xDAAD5678), new Long(0x3FD39D9B, 0x985DB793), new Long(0xD72AF34F, 0x84193F60), new Long(0x7EC0C5DC, 0xC6E9DE8B), new Long(0x84FE9E69, 0x1F8FCB7), new Long(0x2D14A8FA, 0x43081D5C), new Long(0xD9681F90, 0xCD2A5925), new Long(0x70822903, 0x8FDAB8CE), new Long(0x8ABC72B6, 0x48CB9AF2), new Long(0x23564425, 0xA3B7B19), new Long(0x5B4EAF1E, 0x70428B15), new Long(0xF2A4998D, 0x32B26AFE), new Long(0x89AC238, 0xF5A348C2), new Long(0xA170F4AB, 0xB753A929), new Long(0x550C43C1, 0x3971ED50), new Long(0xFCE67552, 0x7B810CBB), new Long(0x6D82EE7, 0xBC902E87), new Long(0xAF321874, 0xFE60CF6C), new Long(0x47CB76A0, 0xE224479F), new Long(0xEE214033, 0xA0D4A674), new Long(0x141F1B86, 0x67C58448), new Long(0xBDF52D15, 0x253565A3), new Long(0x49899A7F, 0xAB1721DA), new Long(0xE063ACEC, 0xE9E7C031), new Long(0x1A5DF759, 0x2EF6E20D), new Long(0xB3B7C1CA, 0x6C0603E6), new Long(0x7D3274CD, 0xF6FAE5C0), new Long(0xD4D8425E, 0xB40A042B), new Long(0x2EE619EB, 0x731B2617), new Long(0x870C2F78, 0x31EBC7FC), new Long(0x73709812, 0xBFC98385), new Long(0xDA9AAE81, 0xFD39626E), new Long(0x20A4F534, 0x3A284052), new Long(0x894EC3A7, 0x78D8A1B9), new Long(0x61B7AD73, 0x649C294A), new Long(0xC85D9BE0, 0x266CC8A1), new Long(0x3263C055, 0xE17DEA9D), new Long(0x9B89F6C6, 0xA38D0B76), new Long(0x6FF541AC, 0x2DAF4F0F), new Long(0xC61F773F, 0x6F5FAEE4), new Long(0x3C212C8A, 0xA84E8CD8), new Long(0x95CB1A19, 0xEABE6D33), new Long(0xEDD3F122, 0x90C79D3F), new Long(0x4439C7B1, 0xD2377CD4), new Long(0xBE079C04, 0x15265EE8), new Long(0x17EDAA97, 0x57D6BF03), new Long(0xE3911DFD, 0xD9F4FB7A), new Long(0x4A7B2B6E, 0x9B041A91), new Long(0xB04570DB, 0x5C1538AD), new Long(0x19AF4648, 0x1EE5D946), new Long(0xF156289C, 0x2A151B5), new Long(0x58BC1E0F, 0x4051B05E), new Long(0xA28245BA, 0x87409262), new Long(0xB687329, 0xC5B07389), new Long(0xFF14C443, 0x4B9237F0), new Long(0x56FEF2D0, 0x962D61B), new Long(0xACC0A965, 0xCE73F427), new Long(0x52A9FF6, 0x8C8315CC), new Long(0x5CF17F13, 0x3A80143F), new Long(0xF51B4980, 0x7870F5D4), new Long(0xF251235, 0xBF61D7E8), new Long(0xA6CF24A6, 0xFD913603), new Long(0x52B393CC, 0x73B3727A), new Long(0xFB59A55F, 0x31439391), new Long(0x167FEEA, 0xF652B1AD), new Long(0xA88DC879, 0xB4A25046), new Long(0x4074A6AD, 0xA8E6D8B5), new Long(0xE99E903E, 0xEA16395E), new Long(0x13A0CB8B, 0x2D071B62), new Long(0xBA4AFD18, 0x6FF7FA89), new Long(0x4E364A72, 0xE1D5BEF0), new Long(0xE7DC7CE1, 0xA3255F1B), new Long(0x1DE22754, 0x64347D27), new Long(0xB40811C7, 0x26C49CCC), new Long(0xCC10FAFC, 0x5CBD6CC0), new Long(0x65FACC6F, 0x1E4D8D2B), new Long(0x9FC497DA, 0xD95CAF17), new Long(0x362EA149, 0x9BAC4EFC), new Long(0xC2521623, 0x158E0A85), new Long(0x6BB820B0, 0x577EEB6E), new Long(0x91867B05, 0x906FC952), new Long(0x386C4D96, 0xD29F28B9), new Long(0xD0952342, 0xCEDBA04A), new Long(0x797F15D1, 0x8C2B41A1), new Long(0x83414E64, 0x4B3A639D), new Long(0x2AAB78F7, 0x9CA8276), new Long(0xDED7CF9D, 0x87E8C60F), new Long(0x773DF90E, 0xC51827E4), new Long(0x8D03A2BB, 0x20905D8), new Long(0x24E99428, 0x40F9E433), new Long(0x975E55E2, 0x2CFFE7D5), new Long(0x3EB46371, 0x6E0F063E), new Long(0xC48A38C4, 0xA91E2402), new Long(0x6D600E57, 0xEBEEC5E9), new Long(0x991CB93D, 0x65CC8190), new Long(0x30F68FAE, 0x273C607B), new Long(0xCAC8D41B, 0xE02D4247), new Long(0x6322E288, 0xA2DDA3AC), new Long(0x8BDB8C5C, 0xBE992B5F), new Long(0x2231BACF, 0xFC69CAB4), new Long(0xD80FE17A, 0x3B78E888), new Long(0x71E5D7E9, 0x79880963), new Long(0x85996083, 0xF7AA4D1A), new Long(0x2C735610, 0xB55AACF1), new Long(0xD64D0DA5, 0x724B8ECD), new Long(0x7FA73B36, 0x30BB6F26), new Long(0x7BFD00D, 0x4AC29F2A), new Long(0xAE55E69E, 0x8327EC1), new Long(0x546BBD2B, 0xCF235CFD), new Long(0xFD818BB8, 0x8DD3BD16), new Long(0x9FD3CD2, 0x3F1F96F), new Long(0xA0170A41, 0x41011884), new Long(0x5A2951F4, 0x86103AB8), new Long(0xF3C36767, 0xC4E0DB53), new Long(0x1B3A09B3, 0xD8A453A0), new Long(0xB2D03F20, 0x9A54B24B), new Long(0x48EE6495, 0x5D459077), new Long(0xE1045206, 0x1FB5719C), new Long(0x1578E56C, 0x919735E5), new Long(0xBC92D3FF, 0xD367D40E), new Long(0x46AC884A, 0x1476F632), new Long(0xEF46BED9, 0x568617D9), new Long(0xB69D5E3C, 0xE085162A), new Long(0x1F7768AF, 0xA275F7C1), new Long(0xE549331A, 0x6564D5FD), new Long(0x4CA30589, 0x27943416), new Long(0xB8DFB2E3, 0xA9B6706F), new Long(0x11358470, 0xEB469184), new Long(0xEB0BDFC5, 0x2C57B3B8), new Long(0x42E1E956, 0x6EA75253), new Long(0xAA188782, 0x72E3DAA0), new Long(0x3F2B111, 0x30133B4B), new Long(0xF9CCEAA4, 0xF7021977), new Long(0x5026DC37, 0xB5F2F89C), new Long(0xA45A6B5D, 0x3BD0BCE5), new Long(0xDB05DCE, 0x79205D0E), new Long(0xF78E067B, 0xBE317F32), new Long(0x5E6430E8, 0xFCC19ED9), new Long(0x267CDBD3, 0x86B86ED5), new Long(0x8F96ED40, 0xC4488F3E), new Long(0x75A8B6F5, 0x359AD02), new Long(0xDC428066, 0x41A94CE9), new Long(0x283E370C, 0xCF8B0890), new Long(0x81D4019F, 0x8D7BE97B), new Long(0x7BEA5A2A, 0x4A6ACB47), new Long(0xD2006CB9, 0x89A2AAC), new Long(0x3AF9026D, 0x14DEA25F), new Long(0x931334FE, 0x562E43B4), new Long(0x692D6F4B, 0x913F6188), new Long(0xC0C759D8, 0xD3CF8063), new Long(0x34BBEEB2, 0x5DEDC41A), new Long(0x9D51D821, 0x1F1D25F1), new Long(0x676F8394, 0xD80C07CD), new Long(0xCE85B507, 0x9AFCE626), ]; diff --git a/webpack.config.ts b/webpack.config.ts index 964dc01..d8be282 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -3,7 +3,7 @@ import { Configuration } from "webpack"; import TerserPlugin from "terser-webpack-plugin"; const config: Configuration = { - entry: "./src/short_crypt.ts", + entry: "./src/lib.ts", output: { clean: true, filename: "short-crypt.min.js",