@pubinfo-pr/module-crypto 0.197.1 → 0.200.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +248 -421
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -635,17 +635,17 @@ var require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
|
635
635
|
]);
|
|
636
636
|
},
|
|
637
637
|
_doProcessBlock: function(e, t) {
|
|
638
|
-
for (var n = this._hash.words, r = n[0], a = n[1], c = n[2], l = n[3], p = n[4], g = n[5], v = n[6], y = n[7], T = r.high, E = r.low, k = a.high, j = a.low, M = c.high, N = c.low, P = l.high, F = l.low, I = p.high, R = p.low, B = g.high, V = g.low, H = v.high, U = v.low, W = y.high, G = y.low, K = T, J = E, Y = k, X = j,
|
|
639
|
-
var
|
|
640
|
-
if (
|
|
638
|
+
for (var n = this._hash.words, r = n[0], a = n[1], c = n[2], l = n[3], p = n[4], g = n[5], v = n[6], y = n[7], T = r.high, E = r.low, k = a.high, j = a.low, M = c.high, N = c.low, P = l.high, F = l.low, I = p.high, R = p.low, B = g.high, V = g.low, H = v.high, U = v.low, W = y.high, G = y.low, K = T, J = E, Y = k, X = j, Ie = M, Z = N, Le = P, Re = F, Q = I, $ = R, ze = B, Be = V, Ve = H, He = U, Ue = W, We = G, Ge = 0; Ge < 80; Ge++) {
|
|
639
|
+
var Ke, qe, Je = h[Ge];
|
|
640
|
+
if (Ge < 16) qe = Je.high = e[t + Ge * 2] | 0, Ke = Je.low = e[t + Ge * 2 + 1] | 0;
|
|
641
641
|
else {
|
|
642
|
-
var
|
|
643
|
-
|
|
642
|
+
var Ye = h[Ge - 15], Xe = Ye.high, Ze = Ye.low, Qe = (Xe >>> 1 | Ze << 31) ^ (Xe >>> 8 | Ze << 24) ^ Xe >>> 7, $e = (Ze >>> 1 | Xe << 31) ^ (Ze >>> 8 | Xe << 24) ^ (Ze >>> 7 | Xe << 25), et = h[Ge - 2], tt = et.high, nt = et.low, rt = (tt >>> 19 | nt << 13) ^ (tt << 3 | nt >>> 29) ^ tt >>> 6, it = (nt >>> 19 | tt << 13) ^ (nt << 3 | tt >>> 29) ^ (nt >>> 6 | tt << 26), at = h[Ge - 7], ot = at.high, st = at.low, ct = h[Ge - 16], lt = ct.high, ut = ct.low;
|
|
643
|
+
Ke = $e + st, qe = Qe + ot + (Ke >>> 0 < $e >>> 0 ? 1 : 0), Ke += it, qe = qe + rt + (Ke >>> 0 < it >>> 0 ? 1 : 0), Ke += ut, qe = qe + lt + (Ke >>> 0 < ut >>> 0 ? 1 : 0), Je.high = qe, Je.low = Ke;
|
|
644
644
|
}
|
|
645
|
-
var
|
|
646
|
-
|
|
645
|
+
var dt = Q & ze ^ ~Q & Ve, ft = $ & Be ^ ~$ & He, pt = K & Y ^ K & Ie ^ Y & Ie, mt = J & X ^ J & Z ^ X & Z, ht = (K >>> 28 | J << 4) ^ (K << 30 | J >>> 2) ^ (K << 25 | J >>> 7), gt = (J >>> 28 | K << 4) ^ (J << 30 | K >>> 2) ^ (J << 25 | K >>> 7), _t = (Q >>> 14 | $ << 18) ^ (Q >>> 18 | $ << 14) ^ (Q << 23 | $ >>> 9), vt = ($ >>> 14 | Q << 18) ^ ($ >>> 18 | Q << 14) ^ ($ << 23 | Q >>> 9), yt = m[Ge], bt = yt.high, xt = yt.low, St = We + vt, Ct = Ue + _t + (St >>> 0 < We >>> 0 ? 1 : 0), St = St + ft, Ct = Ct + dt + (St >>> 0 < ft >>> 0 ? 1 : 0), St = St + xt, Ct = Ct + bt + (St >>> 0 < xt >>> 0 ? 1 : 0), St = St + Ke, Ct = Ct + qe + (St >>> 0 < Ke >>> 0 ? 1 : 0), wt = gt + mt, Tt = ht + pt + (wt >>> 0 < gt >>> 0 ? 1 : 0);
|
|
646
|
+
Ue = Ve, We = He, Ve = ze, He = Be, ze = Q, Be = $, $ = Re + St | 0, Q = Le + Ct + ($ >>> 0 < Re >>> 0 ? 1 : 0) | 0, Le = Ie, Re = Z, Ie = Y, Z = X, Y = K, X = J, J = St + wt | 0, K = Ct + Tt + (J >>> 0 < St >>> 0 ? 1 : 0) | 0;
|
|
647
647
|
}
|
|
648
|
-
E = r.low = E + J, r.high = T + K + (E >>> 0 < J >>> 0 ? 1 : 0), j = a.low = j + X, a.high = k + Y + (j >>> 0 < X >>> 0 ? 1 : 0), N = c.low = N + Z, c.high = M +
|
|
648
|
+
E = r.low = E + J, r.high = T + K + (E >>> 0 < J >>> 0 ? 1 : 0), j = a.low = j + X, a.high = k + Y + (j >>> 0 < X >>> 0 ? 1 : 0), N = c.low = N + Z, c.high = M + Ie + (N >>> 0 < Z >>> 0 ? 1 : 0), F = l.low = F + Re, l.high = P + Le + (F >>> 0 < Re >>> 0 ? 1 : 0), R = p.low = R + $, p.high = I + Q + (R >>> 0 < $ >>> 0 ? 1 : 0), V = g.low = V + Be, g.high = B + ze + (V >>> 0 < Be >>> 0 ? 1 : 0), U = v.low = U + He, v.high = H + Ve + (U >>> 0 < He >>> 0 ? 1 : 0), G = y.low = G + We, y.high = W + Ue + (G >>> 0 < We >>> 0 ? 1 : 0);
|
|
649
649
|
},
|
|
650
650
|
_doFinalize: function() {
|
|
651
651
|
var e = this._data, t = e.words, n = this._nDataBytes * 8, r = e.sigBytes * 8;
|
|
@@ -1135,8 +1135,8 @@ var require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
|
1135
1135
|
var r = t + n, a = e[r];
|
|
1136
1136
|
e[r] = (a << 8 | a >>> 24) & 16711935 | (a << 24 | a >>> 8) & 4278255360;
|
|
1137
1137
|
}
|
|
1138
|
-
for (var c = this._hash.words, l = v.words, T = y.words, F = p.words, I = m.words, R = h.words, B = g.words, V, H, U, W, G, K = V = c[0], J = H = c[1], Y = U = c[2], X = W = c[3],
|
|
1139
|
-
Z = c[1] + U + X | 0, c[1] = c[2] + W +
|
|
1138
|
+
for (var c = this._hash.words, l = v.words, T = y.words, F = p.words, I = m.words, R = h.words, B = g.words, V, H, U, W, G, K = V = c[0], J = H = c[1], Y = U = c[2], X = W = c[3], Ie = G = c[4], Z, n = 0; n < 80; n += 1) Z = V + e[t + F[n]] | 0, n < 16 ? Z += E(H, U, W) + l[0] : n < 32 ? Z += k(H, U, W) + l[1] : n < 48 ? Z += j(H, U, W) + l[2] : n < 64 ? Z += M(H, U, W) + l[3] : Z += N(H, U, W) + l[4], Z |= 0, Z = P(Z, R[n]), Z = Z + G | 0, V = G, G = W, W = P(U, 10), U = H, H = Z, Z = K + e[t + I[n]] | 0, n < 16 ? Z += N(J, Y, X) + T[0] : n < 32 ? Z += M(J, Y, X) + T[1] : n < 48 ? Z += j(J, Y, X) + T[2] : n < 64 ? Z += k(J, Y, X) + T[3] : Z += E(J, Y, X) + T[4], Z |= 0, Z = P(Z, B[n]), Z = Z + Ie | 0, K = Ie, Ie = X, X = P(Y, 10), Y = J, J = Z;
|
|
1139
|
+
Z = c[1] + U + X | 0, c[1] = c[2] + W + Ie | 0, c[2] = c[3] + G + K | 0, c[3] = c[4] + V + J | 0, c[4] = c[0] + H + Y | 0, c[0] = Z;
|
|
1140
1140
|
},
|
|
1141
1141
|
_doFinalize: function() {
|
|
1142
1142
|
var e = this._data, t = e.words, n = this._nDataBytes * 8, r = e.sigBytes * 8;
|
|
@@ -4052,7 +4052,7 @@ var Stream = function() {
|
|
|
4052
4052
|
return t;
|
|
4053
4053
|
}, e.prototype.getHexStringValue = function() {
|
|
4054
4054
|
var e = this.toHexString(), t = this.header * 2, n = this.length * 2;
|
|
4055
|
-
return e.
|
|
4055
|
+
return e.substr(t, n);
|
|
4056
4056
|
}, e.decode = function(t) {
|
|
4057
4057
|
var n = t instanceof Stream ? t : new Stream(t, 0), r = new Stream(n), a = new ASN1Tag(n), c = e.decodeLength(n), l = n.pos, p = l - r.pos, m = null, h = function() {
|
|
4058
4058
|
var t = [];
|
|
@@ -4563,7 +4563,7 @@ var Stream = function() {
|
|
|
4563
4563
|
}, e.prototype.toRadix = function(e) {
|
|
4564
4564
|
if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
|
|
4565
4565
|
var t = this.chunkSize(e), n = e ** +t, r = nbv(n), a = nbi(), c = nbi(), l = "";
|
|
4566
|
-
for (this.divRemTo(r, a, c); a.signum() > 0;) l = (n + c.intValue()).toString(e).
|
|
4566
|
+
for (this.divRemTo(r, a, c); a.signum() > 0;) l = (n + c.intValue()).toString(e).substr(1) + l, a.divRemTo(r, a, c);
|
|
4567
4567
|
return c.intValue().toString(e) + l;
|
|
4568
4568
|
}, e.prototype.fromRadix = function(t, n) {
|
|
4569
4569
|
this.fromInt(0), n ??= 10;
|
|
@@ -4816,13 +4816,13 @@ var rng_state, rng_pool = null, rng_pptr;
|
|
|
4816
4816
|
if (rng_pool == null) {
|
|
4817
4817
|
rng_pool = [], rng_pptr = 0;
|
|
4818
4818
|
var t$1 = void 0;
|
|
4819
|
-
if (typeof window < "u" &&
|
|
4819
|
+
if (typeof window < "u" && window.crypto && window.crypto.getRandomValues) {
|
|
4820
4820
|
var z$1 = new Uint32Array(256);
|
|
4821
|
-
for (
|
|
4821
|
+
for (window.crypto.getRandomValues(z$1), t$1 = 0; t$1 < z$1.length; ++t$1) rng_pool[rng_pptr++] = z$1[t$1] & 255;
|
|
4822
4822
|
}
|
|
4823
4823
|
var count = 0, onMouseMoveListener_1 = function(e) {
|
|
4824
4824
|
if (count ||= 0, count >= 256 || rng_pptr >= 256) {
|
|
4825
|
-
|
|
4825
|
+
window.removeEventListener ? window.removeEventListener("mousemove", onMouseMoveListener_1, !1) : window.detachEvent && window.detachEvent("onmousemove", onMouseMoveListener_1);
|
|
4826
4826
|
return;
|
|
4827
4827
|
}
|
|
4828
4828
|
try {
|
|
@@ -4830,7 +4830,7 @@ if (rng_pool == null) {
|
|
|
4830
4830
|
rng_pool[rng_pptr++] = t & 255, count += 1;
|
|
4831
4831
|
} catch {}
|
|
4832
4832
|
};
|
|
4833
|
-
typeof window < "u" && (
|
|
4833
|
+
typeof window < "u" && (window.addEventListener ? window.addEventListener("mousemove", onMouseMoveListener_1, !1) : window.attachEvent && window.attachEvent("onmousemove", onMouseMoveListener_1));
|
|
4834
4834
|
}
|
|
4835
4835
|
function rng_get_byte() {
|
|
4836
4836
|
if (rng_state == null) {
|
|
@@ -4849,136 +4849,6 @@ var SecureRandom = function() {
|
|
|
4849
4849
|
for (var t = 0; t < e.length; ++t) e[t] = rng_get_byte();
|
|
4850
4850
|
}, e;
|
|
4851
4851
|
}();
|
|
4852
|
-
function rstr_sha256(e) {
|
|
4853
|
-
return binb2rstr(binb_sha256(rstr2binb(e), e.length * 8));
|
|
4854
|
-
}
|
|
4855
|
-
function rstr2hex(e) {
|
|
4856
|
-
for (var t = "0123456789abcdef", n = "", r = 0; r < e.length; r++) {
|
|
4857
|
-
var a = e.charCodeAt(r);
|
|
4858
|
-
n += t.charAt(a >>> 4 & 15) + t.charAt(a & 15);
|
|
4859
|
-
}
|
|
4860
|
-
return n;
|
|
4861
|
-
}
|
|
4862
|
-
function rstr2binb(e) {
|
|
4863
|
-
for (var t = Array(e.length >> 2), n = 0; n < t.length; n++) t[n] = 0;
|
|
4864
|
-
for (var n = 0; n < e.length * 8; n += 8) t[n >> 5] |= (e.charCodeAt(n / 8) & 255) << 24 - n % 32;
|
|
4865
|
-
return t;
|
|
4866
|
-
}
|
|
4867
|
-
function binb2rstr(e) {
|
|
4868
|
-
for (var t = "", n = 0; n < e.length * 32; n += 8) t += String.fromCharCode(e[n >> 5] >>> 24 - n % 32 & 255);
|
|
4869
|
-
return t;
|
|
4870
|
-
}
|
|
4871
|
-
function sha256_S(e, t) {
|
|
4872
|
-
return e >>> t | e << 32 - t;
|
|
4873
|
-
}
|
|
4874
|
-
function sha256_R(e, t) {
|
|
4875
|
-
return e >>> t;
|
|
4876
|
-
}
|
|
4877
|
-
function sha256_Ch(e, t, n) {
|
|
4878
|
-
return e & t ^ ~e & n;
|
|
4879
|
-
}
|
|
4880
|
-
function sha256_Maj(e, t, n) {
|
|
4881
|
-
return e & t ^ e & n ^ t & n;
|
|
4882
|
-
}
|
|
4883
|
-
function sha256_Sigma0256(e) {
|
|
4884
|
-
return sha256_S(e, 2) ^ sha256_S(e, 13) ^ sha256_S(e, 22);
|
|
4885
|
-
}
|
|
4886
|
-
function sha256_Sigma1256(e) {
|
|
4887
|
-
return sha256_S(e, 6) ^ sha256_S(e, 11) ^ sha256_S(e, 25);
|
|
4888
|
-
}
|
|
4889
|
-
function sha256_Gamma0256(e) {
|
|
4890
|
-
return sha256_S(e, 7) ^ sha256_S(e, 18) ^ sha256_R(e, 3);
|
|
4891
|
-
}
|
|
4892
|
-
function sha256_Gamma1256(e) {
|
|
4893
|
-
return sha256_S(e, 17) ^ sha256_S(e, 19) ^ sha256_R(e, 10);
|
|
4894
|
-
}
|
|
4895
|
-
var sha256_K = [
|
|
4896
|
-
1116352408,
|
|
4897
|
-
1899447441,
|
|
4898
|
-
-1245643825,
|
|
4899
|
-
-373957723,
|
|
4900
|
-
961987163,
|
|
4901
|
-
1508970993,
|
|
4902
|
-
-1841331548,
|
|
4903
|
-
-1424204075,
|
|
4904
|
-
-670586216,
|
|
4905
|
-
310598401,
|
|
4906
|
-
607225278,
|
|
4907
|
-
1426881987,
|
|
4908
|
-
1925078388,
|
|
4909
|
-
-2132889090,
|
|
4910
|
-
-1680079193,
|
|
4911
|
-
-1046744716,
|
|
4912
|
-
-459576895,
|
|
4913
|
-
-272742522,
|
|
4914
|
-
264347078,
|
|
4915
|
-
604807628,
|
|
4916
|
-
770255983,
|
|
4917
|
-
1249150122,
|
|
4918
|
-
1555081692,
|
|
4919
|
-
1996064986,
|
|
4920
|
-
-1740746414,
|
|
4921
|
-
-1473132947,
|
|
4922
|
-
-1341970488,
|
|
4923
|
-
-1084653625,
|
|
4924
|
-
-958395405,
|
|
4925
|
-
-710438585,
|
|
4926
|
-
113926993,
|
|
4927
|
-
338241895,
|
|
4928
|
-
666307205,
|
|
4929
|
-
773529912,
|
|
4930
|
-
1294757372,
|
|
4931
|
-
1396182291,
|
|
4932
|
-
1695183700,
|
|
4933
|
-
1986661051,
|
|
4934
|
-
-2117940946,
|
|
4935
|
-
-1838011259,
|
|
4936
|
-
-1564481375,
|
|
4937
|
-
-1474664885,
|
|
4938
|
-
-1035236496,
|
|
4939
|
-
-949202525,
|
|
4940
|
-
-778901479,
|
|
4941
|
-
-694614492,
|
|
4942
|
-
-200395387,
|
|
4943
|
-
275423344,
|
|
4944
|
-
430227734,
|
|
4945
|
-
506948616,
|
|
4946
|
-
659060556,
|
|
4947
|
-
883997877,
|
|
4948
|
-
958139571,
|
|
4949
|
-
1322822218,
|
|
4950
|
-
1537002063,
|
|
4951
|
-
1747873779,
|
|
4952
|
-
1955562222,
|
|
4953
|
-
2024104815,
|
|
4954
|
-
-2067236844,
|
|
4955
|
-
-1933114872,
|
|
4956
|
-
-1866530822,
|
|
4957
|
-
-1538233109,
|
|
4958
|
-
-1090935817,
|
|
4959
|
-
-965641998
|
|
4960
|
-
];
|
|
4961
|
-
function binb_sha256(e, t) {
|
|
4962
|
-
var n = [
|
|
4963
|
-
1779033703,
|
|
4964
|
-
-1150833019,
|
|
4965
|
-
1013904242,
|
|
4966
|
-
-1521486534,
|
|
4967
|
-
1359893119,
|
|
4968
|
-
-1694144372,
|
|
4969
|
-
528734635,
|
|
4970
|
-
1541459225
|
|
4971
|
-
], r = Array(64), a, c, l, p, m, h, g, v, y, T, E, k;
|
|
4972
|
-
for (e[t >> 5] |= 128 << 24 - t % 32, e[(t + 64 >> 9 << 4) + 15] = t, y = 0; y < e.length; y += 16) {
|
|
4973
|
-
for (a = n[0], c = n[1], l = n[2], p = n[3], m = n[4], h = n[5], g = n[6], v = n[7], T = 0; T < 64; T++) T < 16 ? r[T] = e[T + y] : r[T] = safe_add(safe_add(safe_add(sha256_Gamma1256(r[T - 2]), r[T - 7]), sha256_Gamma0256(r[T - 15])), r[T - 16]), E = safe_add(safe_add(safe_add(safe_add(v, sha256_Sigma1256(m)), sha256_Ch(m, h, g)), sha256_K[T]), r[T]), k = safe_add(sha256_Sigma0256(a), sha256_Maj(a, c, l)), v = g, g = h, h = m, m = safe_add(p, E), p = l, l = c, c = a, a = safe_add(E, k);
|
|
4974
|
-
n[0] = safe_add(a, n[0]), n[1] = safe_add(c, n[1]), n[2] = safe_add(l, n[2]), n[3] = safe_add(p, n[3]), n[4] = safe_add(m, n[4]), n[5] = safe_add(h, n[5]), n[6] = safe_add(g, n[6]), n[7] = safe_add(v, n[7]);
|
|
4975
|
-
}
|
|
4976
|
-
return n;
|
|
4977
|
-
}
|
|
4978
|
-
function safe_add(e, t) {
|
|
4979
|
-
var n = (e & 65535) + (t & 65535);
|
|
4980
|
-
return (e >> 16) + (t >> 16) + (n >> 16) << 16 | n & 65535;
|
|
4981
|
-
}
|
|
4982
4852
|
function pkcs1pad1(e, t) {
|
|
4983
4853
|
if (t < e.length + 22) return console.error("Message too long for RSA"), null;
|
|
4984
4854
|
for (var n = t - e.length - 6, r = "", a = 0; a < n; a += 2) r += "ff";
|
|
@@ -4997,29 +4867,6 @@ function pkcs1pad2(e, t) {
|
|
|
4997
4867
|
}
|
|
4998
4868
|
return n[--t] = 2, n[--t] = 0, new BigInteger(n);
|
|
4999
4869
|
}
|
|
5000
|
-
function oaep_mgf1_arr(e, t, n) {
|
|
5001
|
-
for (var r = "", a = 0; r.length < t;) r += n(String.fromCharCode.apply(String, e.concat([
|
|
5002
|
-
(a & 4278190080) >> 24,
|
|
5003
|
-
(a & 16711680) >> 16,
|
|
5004
|
-
(a & 65280) >> 8,
|
|
5005
|
-
a & 255
|
|
5006
|
-
]))), a += 1;
|
|
5007
|
-
return r;
|
|
5008
|
-
}
|
|
5009
|
-
var SHA256_SIZE = 32;
|
|
5010
|
-
function oaep_pad(e, t) {
|
|
5011
|
-
var n = SHA256_SIZE, r = rstr_sha256;
|
|
5012
|
-
if (e.length + 2 * n + 2 > t) throw "Message too long for RSA";
|
|
5013
|
-
var a = "", c;
|
|
5014
|
-
for (c = 0; c < t - e.length - 2 * n - 2; c += 1) a += "\0";
|
|
5015
|
-
var l = r("") + a + "" + e, p = Array(n);
|
|
5016
|
-
new SecureRandom().nextBytes(p);
|
|
5017
|
-
var m = oaep_mgf1_arr(p, l.length, r), h = [];
|
|
5018
|
-
for (c = 0; c < l.length; c += 1) h[c] = l.charCodeAt(c) ^ m.charCodeAt(c);
|
|
5019
|
-
var g = oaep_mgf1_arr(h, p.length, r), v = [0];
|
|
5020
|
-
for (c = 0; c < p.length; c += 1) v[c + 1] = p[c] ^ g.charCodeAt(c);
|
|
5021
|
-
return new BigInteger(v.concat(h));
|
|
5022
|
-
}
|
|
5023
4870
|
var RSAKey = function() {
|
|
5024
4871
|
function e() {
|
|
5025
4872
|
this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
|
|
@@ -5032,14 +4879,13 @@ var RSAKey = function() {
|
|
|
5032
4879
|
return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
|
|
5033
4880
|
}, e.prototype.setPublic = function(e, t) {
|
|
5034
4881
|
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = parseBigInt(e, 16), this.e = parseInt(t, 16)) : console.error("Invalid RSA public key");
|
|
5035
|
-
}, e.prototype.encrypt = function(e
|
|
5036
|
-
t
|
|
5037
|
-
|
|
4882
|
+
}, e.prototype.encrypt = function(e) {
|
|
4883
|
+
var t = this.n.bitLength() + 7 >> 3, n = pkcs1pad2(e, t);
|
|
4884
|
+
if (n == null) return null;
|
|
4885
|
+
var r = this.doPublic(n);
|
|
5038
4886
|
if (r == null) return null;
|
|
5039
|
-
var a =
|
|
5040
|
-
|
|
5041
|
-
for (var c = a.toString(16), l = c.length, p = 0; p < n * 2 - l; p++) c = "0" + c;
|
|
5042
|
-
return c;
|
|
4887
|
+
for (var a = r.toString(16), c = a.length, l = 0; l < t * 2 - c; l++) a = "0" + a;
|
|
4888
|
+
return a;
|
|
5043
4889
|
}, e.prototype.setPrivate = function(e, t, n) {
|
|
5044
4890
|
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = parseBigInt(e, 16), this.e = parseInt(t, 16), this.d = parseBigInt(n, 16)) : console.error("Invalid RSA private key");
|
|
5045
4891
|
}, e.prototype.setPrivateEx = function(e, t, n, r, a, c, l, p) {
|
|
@@ -5093,12 +4939,12 @@ var RSAKey = function() {
|
|
|
5093
4939
|
};
|
|
5094
4940
|
setTimeout(p, 0);
|
|
5095
4941
|
}, e.prototype.sign = function(e, t, n) {
|
|
5096
|
-
var r = getDigestHeader(n) + t(e).toString(),
|
|
5097
|
-
if (
|
|
5098
|
-
var
|
|
5099
|
-
if (
|
|
5100
|
-
|
|
5101
|
-
return
|
|
4942
|
+
var r = pkcs1pad1(getDigestHeader(n) + t(e).toString(), this.n.bitLength() / 4);
|
|
4943
|
+
if (r == null) return null;
|
|
4944
|
+
var a = this.doPrivate(r);
|
|
4945
|
+
if (a == null) return null;
|
|
4946
|
+
var c = a.toString(16);
|
|
4947
|
+
return c.length & 1 ? "0" + c : c;
|
|
5102
4948
|
}, e.prototype.verify = function(e, t, n) {
|
|
5103
4949
|
var r = parseBigInt(t, 16), a = this.doPublic(r);
|
|
5104
4950
|
return a == null ? null : removeDigestHeader(a.toString(16).replace(/^1f+00/, "")) == n(e).toString();
|
|
@@ -5130,12 +4976,13 @@ function getDigestHeader(e) {
|
|
|
5130
4976
|
function removeDigestHeader(e) {
|
|
5131
4977
|
for (var t in DIGEST_HEADERS) if (DIGEST_HEADERS.hasOwnProperty(t)) {
|
|
5132
4978
|
var n = DIGEST_HEADERS[t], r = n.length;
|
|
5133
|
-
if (e.
|
|
4979
|
+
if (e.substr(0, r) == n) return e.substr(r);
|
|
5134
4980
|
}
|
|
5135
4981
|
return e;
|
|
5136
4982
|
}
|
|
5137
|
-
|
|
5138
|
-
|
|
4983
|
+
var YAHOO = {};
|
|
4984
|
+
YAHOO.lang = { extend: function(e, t, n) {
|
|
4985
|
+
if (!t || !e) throw Error("YAHOO.lang.extend failed, please check that all dependencies are included.");
|
|
5139
4986
|
var r = function() {};
|
|
5140
4987
|
if (r.prototype = t.prototype, e.prototype = new r(), e.prototype.constructor = e, e.superclass = t.prototype, t.prototype.constructor == Object.prototype.constructor && (t.prototype.constructor = t), n) {
|
|
5141
4988
|
for (var a in n) e.prototype[a] = n[a];
|
|
@@ -5150,7 +4997,7 @@ function extendClass(e, t, n) {
|
|
|
5150
4997
|
} catch {}
|
|
5151
4998
|
c(e.prototype, n);
|
|
5152
4999
|
}
|
|
5153
|
-
}
|
|
5000
|
+
} };
|
|
5154
5001
|
/**
|
|
5155
5002
|
* @fileOverview
|
|
5156
5003
|
* @name asn1-1.0.js
|
|
@@ -5166,9 +5013,9 @@ var KJUR = {};
|
|
|
5166
5013
|
return t.length % 2 == 1 && (t = "0" + t), t;
|
|
5167
5014
|
}, this.bigIntToMinTwosComplementsHex = function(e) {
|
|
5168
5015
|
var t = e.toString(16);
|
|
5169
|
-
if (t.
|
|
5016
|
+
if (t.substr(0, 1) != "-") t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
|
|
5170
5017
|
else {
|
|
5171
|
-
var n = t.
|
|
5018
|
+
var n = t.substr(1).length;
|
|
5172
5019
|
n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
|
|
5173
5020
|
for (var r = "", a = 0; a < n; a++) r += "f";
|
|
5174
5021
|
t = new BigInteger(r, 16).xor(e).add(BigInteger.ONE).toString(16).replace(/^-/, "");
|
|
@@ -5228,9 +5075,9 @@ var KJUR = {};
|
|
|
5228
5075
|
return this.newObject(e).getEncodedHex();
|
|
5229
5076
|
};
|
|
5230
5077
|
}(), KJUR.asn1.ASN1Util.oidHexToInt = function(e) {
|
|
5231
|
-
for (var t = "", n = parseInt(e.
|
|
5232
|
-
var p = ("00000000" + parseInt(e.
|
|
5233
|
-
if (c += p.
|
|
5078
|
+
for (var t = "", n = parseInt(e.substr(0, 2), 16), r = Math.floor(n / 40), a = n % 40, t = r + "." + a, c = "", l = 2; l < e.length; l += 2) {
|
|
5079
|
+
var p = ("00000000" + parseInt(e.substr(l, 2), 16).toString(2)).slice(-8);
|
|
5080
|
+
if (c += p.substr(1, 7), p.substr(0, 1) == "0") {
|
|
5234
5081
|
var m = new BigInteger(c, 2);
|
|
5235
5082
|
t = t + "." + m.toString(10), c = "";
|
|
5236
5083
|
}
|
|
@@ -5246,7 +5093,7 @@ var KJUR = {};
|
|
|
5246
5093
|
for (var c = "", l = 0; l < a; l++) c += "0";
|
|
5247
5094
|
r = c + r;
|
|
5248
5095
|
for (var l = 0; l < r.length - 1; l += 7) {
|
|
5249
|
-
var p = r.
|
|
5096
|
+
var p = r.substr(l, 7);
|
|
5250
5097
|
l != r.length - 7 && (p = "1" + p), n += t(parseInt(p, 2));
|
|
5251
5098
|
}
|
|
5252
5099
|
return n;
|
|
@@ -5283,12 +5130,12 @@ var KJUR = {};
|
|
|
5283
5130
|
}, this.getFreshValueHex = function() {
|
|
5284
5131
|
return this.hV;
|
|
5285
5132
|
}, e !== void 0 && (typeof e == "string" ? this.setString(e) : e.str === void 0 ? e.hex !== void 0 && this.setStringHex(e.hex) : this.setString(e.str));
|
|
5286
|
-
},
|
|
5133
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object), KJUR.asn1.DERAbstractTime = function(e) {
|
|
5287
5134
|
KJUR.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(e) {
|
|
5288
5135
|
return utc = e.getTime() + e.getTimezoneOffset() * 6e4, new Date(utc);
|
|
5289
5136
|
}, this.formatDate = function(e, t, n) {
|
|
5290
5137
|
var r = this.zeroPadding, a = this.localDateToUTC(e), c = String(a.getFullYear());
|
|
5291
|
-
t == "utc" && (c = c.
|
|
5138
|
+
t == "utc" && (c = c.substr(2, 2));
|
|
5292
5139
|
var l = r(String(a.getMonth() + 1), 2), p = r(String(a.getDate()), 2), m = r(String(a.getHours()), 2), h = r(String(a.getMinutes()), 2), g = r(String(a.getSeconds()), 2), v = c + l + p + m + h + g;
|
|
5293
5140
|
if (n === !0) {
|
|
5294
5141
|
var y = a.getMilliseconds();
|
|
@@ -5310,15 +5157,15 @@ var KJUR = {};
|
|
|
5310
5157
|
}, this.getFreshValueHex = function() {
|
|
5311
5158
|
return this.hV;
|
|
5312
5159
|
};
|
|
5313
|
-
},
|
|
5160
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object), KJUR.asn1.DERAbstractStructured = function(e) {
|
|
5314
5161
|
KJUR.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(e) {
|
|
5315
5162
|
this.hTLV = null, this.isModified = !0, this.asn1Array = e;
|
|
5316
5163
|
}, this.appendASN1Object = function(e) {
|
|
5317
5164
|
this.hTLV = null, this.isModified = !0, this.asn1Array.push(e);
|
|
5318
5165
|
}, this.asn1Array = [], e !== void 0 && e.array !== void 0 && (this.asn1Array = e.array);
|
|
5319
|
-
},
|
|
5166
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object), KJUR.asn1.DERBoolean = function() {
|
|
5320
5167
|
KJUR.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
|
|
5321
|
-
},
|
|
5168
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object), KJUR.asn1.DERInteger = function(e) {
|
|
5322
5169
|
KJUR.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(e) {
|
|
5323
5170
|
this.hTLV = null, this.isModified = !0, this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
|
|
5324
5171
|
}, this.setByInteger = function(e) {
|
|
@@ -5329,7 +5176,7 @@ var KJUR = {};
|
|
|
5329
5176
|
}, this.getFreshValueHex = function() {
|
|
5330
5177
|
return this.hV;
|
|
5331
5178
|
}, e !== void 0 && (e.bigint === void 0 ? e.int === void 0 ? typeof e == "number" ? this.setByInteger(e) : e.hex !== void 0 && this.setValueHex(e.hex) : this.setByInteger(e.int) : this.setByBigInteger(e.bigint));
|
|
5332
|
-
},
|
|
5179
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object), KJUR.asn1.DERBitString = function(e) {
|
|
5333
5180
|
e !== void 0 && e.obj !== void 0 && (e.hex = "00" + KJUR.asn1.ASN1Util.newObject(e.obj).getEncodedHex()), KJUR.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function(e) {
|
|
5334
5181
|
this.hTLV = null, this.isModified = !0, this.hV = e;
|
|
5335
5182
|
}, this.setUnusedBitsAndHexValue = function(e, t) {
|
|
@@ -5342,7 +5189,7 @@ var KJUR = {};
|
|
|
5342
5189
|
t == 8 && (t = 0);
|
|
5343
5190
|
for (var n = 0; n <= t; n++) e += "0";
|
|
5344
5191
|
for (var r = "", n = 0; n < e.length - 1; n += 8) {
|
|
5345
|
-
var a = e.
|
|
5192
|
+
var a = e.substr(n, 8), c = parseInt(a, 2).toString(16);
|
|
5346
5193
|
c.length == 1 && (c = "0" + c), r += c;
|
|
5347
5194
|
}
|
|
5348
5195
|
this.hTLV = null, this.isModified = !0, this.hV = "0" + t + r;
|
|
@@ -5355,11 +5202,11 @@ var KJUR = {};
|
|
|
5355
5202
|
}, this.getFreshValueHex = function() {
|
|
5356
5203
|
return this.hV;
|
|
5357
5204
|
}, e !== void 0 && (typeof e == "string" && e.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(e) : e.hex === void 0 ? e.bin === void 0 ? e.array !== void 0 && this.setByBooleanArray(e.array) : this.setByBinaryString(e.bin) : this.setHexValueIncludingUnusedBits(e.hex));
|
|
5358
|
-
},
|
|
5205
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object), KJUR.asn1.DEROctetString = function(e) {
|
|
5359
5206
|
e !== void 0 && e.obj !== void 0 && (e.hex = KJUR.asn1.ASN1Util.newObject(e.obj).getEncodedHex()), KJUR.asn1.DEROctetString.superclass.constructor.call(this, e), this.hT = "04";
|
|
5360
|
-
},
|
|
5207
|
+
}, YAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERNull = function() {
|
|
5361
5208
|
KJUR.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
|
|
5362
|
-
},
|
|
5209
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object), KJUR.asn1.DERObjectIdentifier = function(e) {
|
|
5363
5210
|
var t = function(e) {
|
|
5364
5211
|
var t = e.toString(16);
|
|
5365
5212
|
return t.length == 1 && (t = "0" + t), t;
|
|
@@ -5369,7 +5216,7 @@ var KJUR = {};
|
|
|
5369
5216
|
for (var c = "", l = 0; l < a; l++) c += "0";
|
|
5370
5217
|
r = c + r;
|
|
5371
5218
|
for (var l = 0; l < r.length - 1; l += 7) {
|
|
5372
|
-
var p = r.
|
|
5219
|
+
var p = r.substr(l, 7);
|
|
5373
5220
|
l != r.length - 7 && (p = "1" + p), n += t(parseInt(p, 2));
|
|
5374
5221
|
}
|
|
5375
5222
|
return n;
|
|
@@ -5389,7 +5236,7 @@ var KJUR = {};
|
|
|
5389
5236
|
}, this.getFreshValueHex = function() {
|
|
5390
5237
|
return this.hV;
|
|
5391
5238
|
}, e !== void 0 && (typeof e == "string" ? e.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(e) : this.setValueName(e) : e.oid === void 0 ? e.hex === void 0 ? e.name !== void 0 && this.setValueName(e.name) : this.setValueHex(e.hex) : this.setValueOidString(e.oid));
|
|
5392
|
-
},
|
|
5239
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object), KJUR.asn1.DEREnumerated = function(e) {
|
|
5393
5240
|
KJUR.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(e) {
|
|
5394
5241
|
this.hTLV = null, this.isModified = !0, this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
|
|
5395
5242
|
}, this.setByInteger = function(e) {
|
|
@@ -5400,29 +5247,29 @@ var KJUR = {};
|
|
|
5400
5247
|
}, this.getFreshValueHex = function() {
|
|
5401
5248
|
return this.hV;
|
|
5402
5249
|
}, e !== void 0 && (e.int === void 0 ? typeof e == "number" ? this.setByInteger(e) : e.hex !== void 0 && this.setValueHex(e.hex) : this.setByInteger(e.int));
|
|
5403
|
-
},
|
|
5250
|
+
}, YAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object), KJUR.asn1.DERUTF8String = function(e) {
|
|
5404
5251
|
KJUR.asn1.DERUTF8String.superclass.constructor.call(this, e), this.hT = "0c";
|
|
5405
|
-
},
|
|
5252
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString), KJUR.asn1.DERNumericString = function(e) {
|
|
5406
5253
|
KJUR.asn1.DERNumericString.superclass.constructor.call(this, e), this.hT = "12";
|
|
5407
|
-
},
|
|
5254
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERPrintableString = function(e) {
|
|
5408
5255
|
KJUR.asn1.DERPrintableString.superclass.constructor.call(this, e), this.hT = "13";
|
|
5409
|
-
},
|
|
5256
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERTeletexString = function(e) {
|
|
5410
5257
|
KJUR.asn1.DERTeletexString.superclass.constructor.call(this, e), this.hT = "14";
|
|
5411
|
-
},
|
|
5258
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERIA5String = function(e) {
|
|
5412
5259
|
KJUR.asn1.DERIA5String.superclass.constructor.call(this, e), this.hT = "16";
|
|
5413
|
-
},
|
|
5260
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString), KJUR.asn1.DERUTCTime = function(e) {
|
|
5414
5261
|
KJUR.asn1.DERUTCTime.superclass.constructor.call(this, e), this.hT = "17", this.setByDate = function(e) {
|
|
5415
5262
|
this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
|
|
5416
5263
|
}, this.getFreshValueHex = function() {
|
|
5417
5264
|
return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
|
|
5418
5265
|
}, e !== void 0 && (e.str === void 0 ? typeof e == "string" && e.match(/^[0-9]{12}Z$/) ? this.setString(e) : e.hex === void 0 ? e.date !== void 0 && this.setByDate(e.date) : this.setStringHex(e.hex) : this.setString(e.str));
|
|
5419
|
-
},
|
|
5266
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime), KJUR.asn1.DERGeneralizedTime = function(e) {
|
|
5420
5267
|
KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, e), this.hT = "18", this.withMillis = !1, this.setByDate = function(e) {
|
|
5421
5268
|
this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
|
|
5422
5269
|
}, this.getFreshValueHex = function() {
|
|
5423
5270
|
return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
|
|
5424
5271
|
}, e !== void 0 && (e.str === void 0 ? typeof e == "string" && e.match(/^[0-9]{14}Z$/) ? this.setString(e) : e.hex === void 0 ? e.date !== void 0 && this.setByDate(e.date) : this.setStringHex(e.hex) : this.setString(e.str), e.millis === !0 && (this.withMillis = !0));
|
|
5425
|
-
},
|
|
5272
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime), KJUR.asn1.DERSequence = function(e) {
|
|
5426
5273
|
KJUR.asn1.DERSequence.superclass.constructor.call(this, e), this.hT = "30", this.getFreshValueHex = function() {
|
|
5427
5274
|
for (var e = "", t = 0; t < this.asn1Array.length; t++) {
|
|
5428
5275
|
var n = this.asn1Array[t];
|
|
@@ -5430,7 +5277,7 @@ var KJUR = {};
|
|
|
5430
5277
|
}
|
|
5431
5278
|
return this.hV = e, this.hV;
|
|
5432
5279
|
};
|
|
5433
|
-
},
|
|
5280
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured), KJUR.asn1.DERSet = function(e) {
|
|
5434
5281
|
KJUR.asn1.DERSet.superclass.constructor.call(this, e), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
|
|
5435
5282
|
for (var e = [], t = 0; t < this.asn1Array.length; t++) {
|
|
5436
5283
|
var n = this.asn1Array[t];
|
|
@@ -5438,13 +5285,13 @@ var KJUR = {};
|
|
|
5438
5285
|
}
|
|
5439
5286
|
return this.sortFlag == 1 && e.sort(), this.hV = e.join(""), this.hV;
|
|
5440
5287
|
}, e !== void 0 && e.sortflag !== void 0 && e.sortflag == 0 && (this.sortFlag = !1);
|
|
5441
|
-
},
|
|
5288
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured), KJUR.asn1.DERTaggedObject = function(e) {
|
|
5442
5289
|
KJUR.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(e, t, n) {
|
|
5443
5290
|
this.hT = t, this.isExplicit = e, this.asn1Object = n, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = n.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, t), this.isModified = !1);
|
|
5444
5291
|
}, this.getFreshValueHex = function() {
|
|
5445
5292
|
return this.hV;
|
|
5446
5293
|
}, e !== void 0 && (e.tag !== void 0 && (this.hT = e.tag), e.explicit !== void 0 && (this.isExplicit = e.explicit), e.obj !== void 0 && (this.asn1Object = e.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
|
|
5447
|
-
},
|
|
5294
|
+
}, YAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);
|
|
5448
5295
|
var __extends = (function() {
|
|
5449
5296
|
var e = function(t, n) {
|
|
5450
5297
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
@@ -5519,10 +5366,10 @@ var __extends = (function() {
|
|
|
5519
5366
|
}, t;
|
|
5520
5367
|
}(RSAKey), version = typeof process < "u" ? process.env?.npm_package_version : void 0, lib_default = function() {
|
|
5521
5368
|
function e(e) {
|
|
5522
|
-
e === void 0 && (e = {}), this.default_key_size = e.default_key_size ? parseInt(e.default_key_size, 10) : 1024, this.default_public_exponent = e.default_public_exponent || "010001", this.log = e.log || !1, this.key =
|
|
5369
|
+
e === void 0 && (e = {}), e ||= {}, this.default_key_size = e.default_key_size ? parseInt(e.default_key_size, 10) : 1024, this.default_public_exponent = e.default_public_exponent || "010001", this.log = e.log || !1, this.key = null;
|
|
5523
5370
|
}
|
|
5524
5371
|
return e.prototype.setKey = function(e) {
|
|
5525
|
-
|
|
5372
|
+
this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new JSEncryptRSAKey(e);
|
|
5526
5373
|
}, e.prototype.setPrivateKey = function(e) {
|
|
5527
5374
|
this.setKey(e);
|
|
5528
5375
|
}, e.prototype.setPublicKey = function(e) {
|
|
@@ -5539,38 +5386,18 @@ var __extends = (function() {
|
|
|
5539
5386
|
} catch {
|
|
5540
5387
|
return !1;
|
|
5541
5388
|
}
|
|
5542
|
-
}, e.prototype.encryptOAEP = function(e) {
|
|
5543
|
-
try {
|
|
5544
|
-
return hex2b64(this.getKey().encrypt(e, oaep_pad));
|
|
5545
|
-
} catch {
|
|
5546
|
-
return !1;
|
|
5547
|
-
}
|
|
5548
5389
|
}, e.prototype.sign = function(e, t, n) {
|
|
5549
|
-
t === void 0 && (t = function(e) {
|
|
5550
|
-
return e;
|
|
5551
|
-
}), n === void 0 && (n = "");
|
|
5552
5390
|
try {
|
|
5553
5391
|
return hex2b64(this.getKey().sign(e, t, n));
|
|
5554
5392
|
} catch {
|
|
5555
5393
|
return !1;
|
|
5556
5394
|
}
|
|
5557
|
-
}, e.prototype.signSha256 = function(e) {
|
|
5558
|
-
return this.sign(e, function(e) {
|
|
5559
|
-
return rstr2hex(rstr_sha256(e));
|
|
5560
|
-
}, "sha256");
|
|
5561
5395
|
}, e.prototype.verify = function(e, t, n) {
|
|
5562
|
-
n === void 0 && (n = function(e) {
|
|
5563
|
-
return e;
|
|
5564
|
-
});
|
|
5565
5396
|
try {
|
|
5566
5397
|
return this.getKey().verify(e, b64tohex(t), n);
|
|
5567
5398
|
} catch {
|
|
5568
5399
|
return !1;
|
|
5569
5400
|
}
|
|
5570
|
-
}, e.prototype.verifySha256 = function(e, t) {
|
|
5571
|
-
return this.verify(e, t, function(e) {
|
|
5572
|
-
return rstr2hex(rstr_sha256(e));
|
|
5573
|
-
});
|
|
5574
5401
|
}, e.prototype.getKey = function(e) {
|
|
5575
5402
|
if (!this.key) {
|
|
5576
5403
|
if (this.key = new JSEncryptRSAKey(), e && {}.toString.call(e) === "[object Function]") {
|
|
@@ -5735,7 +5562,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5735
5562
|
if (typeof e == "string") return y(e, t);
|
|
5736
5563
|
if (ArrayBuffer.isView(e)) return E(e);
|
|
5737
5564
|
if (e == null) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
5738
|
-
if (
|
|
5565
|
+
if (Ye(e, ArrayBuffer) || e && Ye(e.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (Ye(e, SharedArrayBuffer) || e && Ye(e.buffer, SharedArrayBuffer))) return k(e, t, n);
|
|
5739
5566
|
if (typeof e == "number") throw TypeError("The \"value\" argument must not be of type number. Received type number");
|
|
5740
5567
|
var r = e.valueOf && e.valueOf();
|
|
5741
5568
|
if (r != null && r !== e) return p.from(r, t, n);
|
|
@@ -5775,7 +5602,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5775
5602
|
return n;
|
|
5776
5603
|
}
|
|
5777
5604
|
function E(e) {
|
|
5778
|
-
if (
|
|
5605
|
+
if (Ye(e, Uint8Array)) {
|
|
5779
5606
|
var t = new Uint8Array(e);
|
|
5780
5607
|
return k(t.buffer, t.byteOffset, t.byteLength);
|
|
5781
5608
|
}
|
|
@@ -5792,7 +5619,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5792
5619
|
var t = M(e.length) | 0, n = l(t);
|
|
5793
5620
|
return n.length === 0 || e.copy(n, 0, 0, t), n;
|
|
5794
5621
|
}
|
|
5795
|
-
if (e.length !== void 0) return typeof e.length != "number" ||
|
|
5622
|
+
if (e.length !== void 0) return typeof e.length != "number" || Xe(e.length) ? l(0) : T(e);
|
|
5796
5623
|
if (e.type === "Buffer" && Array.isArray(e.data)) return T(e.data);
|
|
5797
5624
|
}
|
|
5798
5625
|
function M(e) {
|
|
@@ -5805,7 +5632,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5805
5632
|
p.isBuffer = function(e) {
|
|
5806
5633
|
return e != null && e._isBuffer === !0 && e !== p.prototype;
|
|
5807
5634
|
}, p.compare = function(e, t) {
|
|
5808
|
-
if (
|
|
5635
|
+
if (Ye(e, Uint8Array) && (e = p.from(e, e.offset, e.byteLength)), Ye(t, Uint8Array) && (t = p.from(t, t.offset, t.byteLength)), !p.isBuffer(e) || !p.isBuffer(t)) throw TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
|
|
5809
5636
|
if (e === t) return 0;
|
|
5810
5637
|
for (var n = e.length, r = t.length, a = 0, c = Math.min(n, r); a < c; ++a) if (e[a] !== t[a]) {
|
|
5811
5638
|
n = e[a], r = t[a];
|
|
@@ -5835,7 +5662,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5835
5662
|
var r = p.allocUnsafe(t), a = 0;
|
|
5836
5663
|
for (n = 0; n < e.length; ++n) {
|
|
5837
5664
|
var c = e[n];
|
|
5838
|
-
if (
|
|
5665
|
+
if (Ye(c, Uint8Array)) a + c.length > r.length ? p.from(c).copy(r, a) : Uint8Array.prototype.set.call(r, c, a);
|
|
5839
5666
|
else if (p.isBuffer(c)) c.copy(r, a);
|
|
5840
5667
|
else throw TypeError("\"list\" argument must be an Array of Buffers");
|
|
5841
5668
|
a += c.length;
|
|
@@ -5844,7 +5671,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5844
5671
|
};
|
|
5845
5672
|
function P(e, t) {
|
|
5846
5673
|
if (p.isBuffer(e)) return e.length;
|
|
5847
|
-
if (ArrayBuffer.isView(e) ||
|
|
5674
|
+
if (ArrayBuffer.isView(e) || Ye(e, ArrayBuffer)) return e.byteLength;
|
|
5848
5675
|
if (typeof e != "string") throw TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof e);
|
|
5849
5676
|
var n = e.length, r = arguments.length > 2 && arguments[2] === !0;
|
|
5850
5677
|
if (!r && n === 0) return 0;
|
|
@@ -5853,15 +5680,15 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5853
5680
|
case "latin1":
|
|
5854
5681
|
case "binary": return n;
|
|
5855
5682
|
case "utf8":
|
|
5856
|
-
case "utf-8": return
|
|
5683
|
+
case "utf-8": return We(e).length;
|
|
5857
5684
|
case "ucs2":
|
|
5858
5685
|
case "ucs-2":
|
|
5859
5686
|
case "utf16le":
|
|
5860
5687
|
case "utf-16le": return n * 2;
|
|
5861
5688
|
case "hex": return n >>> 1;
|
|
5862
|
-
case "base64": return
|
|
5689
|
+
case "base64": return qe(e).length;
|
|
5863
5690
|
default:
|
|
5864
|
-
if (a) return r ? -1 :
|
|
5691
|
+
if (a) return r ? -1 : We(e).length;
|
|
5865
5692
|
t = ("" + t).toLowerCase(), a = !0;
|
|
5866
5693
|
}
|
|
5867
5694
|
}
|
|
@@ -5870,17 +5697,17 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5870
5697
|
var r = !1;
|
|
5871
5698
|
if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((n === void 0 || n > this.length) && (n = this.length), n <= 0) || (n >>>= 0, t >>>= 0, n <= t)) return "";
|
|
5872
5699
|
for (e ||= "utf8";;) switch (e) {
|
|
5873
|
-
case "hex": return
|
|
5700
|
+
case "hex": return Le(this, t, n);
|
|
5874
5701
|
case "utf8":
|
|
5875
5702
|
case "utf-8": return J(this, t, n);
|
|
5876
|
-
case "ascii": return
|
|
5703
|
+
case "ascii": return Ie(this, t, n);
|
|
5877
5704
|
case "latin1":
|
|
5878
5705
|
case "binary": return Z(this, t, n);
|
|
5879
5706
|
case "base64": return K(this, t, n);
|
|
5880
5707
|
case "ucs2":
|
|
5881
5708
|
case "ucs-2":
|
|
5882
5709
|
case "utf16le":
|
|
5883
|
-
case "utf-16le": return
|
|
5710
|
+
case "utf-16le": return Re(this, t, n);
|
|
5884
5711
|
default:
|
|
5885
5712
|
if (r) throw TypeError("Unknown encoding: " + e);
|
|
5886
5713
|
e = (e + "").toLowerCase(), r = !0;
|
|
@@ -5916,7 +5743,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5916
5743
|
var t = "", n = e.INSPECT_MAX_BYTES;
|
|
5917
5744
|
return t = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), this.length > n && (t += " ... "), "<Buffer " + t + ">";
|
|
5918
5745
|
}, r && (p.prototype[r] = p.prototype.inspect), p.prototype.compare = function(e, t, n, r, a) {
|
|
5919
|
-
if (
|
|
5746
|
+
if (Ye(e, Uint8Array) && (e = p.from(e, e.offset, e.byteLength)), !p.isBuffer(e)) throw TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof e);
|
|
5920
5747
|
if (t === void 0 && (t = 0), n === void 0 && (n = e ? e.length : 0), r === void 0 && (r = 0), a === void 0 && (a = this.length), t < 0 || n > e.length || r < 0 || a > this.length) throw RangeError("out of range index");
|
|
5921
5748
|
if (r >= a && t >= n) return 0;
|
|
5922
5749
|
if (r >= a) return -1;
|
|
@@ -5930,7 +5757,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5930
5757
|
};
|
|
5931
5758
|
function R(e, t, n, r, a) {
|
|
5932
5759
|
if (e.length === 0) return -1;
|
|
5933
|
-
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n,
|
|
5760
|
+
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, Xe(n) && (n = a ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
|
|
5934
5761
|
if (a) return -1;
|
|
5935
5762
|
n = e.length - 1;
|
|
5936
5763
|
} else if (n < 0) if (a) n = 0;
|
|
@@ -5978,22 +5805,22 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
5978
5805
|
r > c / 2 && (r = c / 2);
|
|
5979
5806
|
for (var l = 0; l < r; ++l) {
|
|
5980
5807
|
var p = parseInt(t.substr(l * 2, 2), 16);
|
|
5981
|
-
if (
|
|
5808
|
+
if (Xe(p)) return l;
|
|
5982
5809
|
e[n + l] = p;
|
|
5983
5810
|
}
|
|
5984
5811
|
return l;
|
|
5985
5812
|
}
|
|
5986
5813
|
function H(e, t, n, r) {
|
|
5987
|
-
return
|
|
5814
|
+
return Je(We(t, e.length - n), e, n, r);
|
|
5988
5815
|
}
|
|
5989
5816
|
function U(e, t, n, r) {
|
|
5990
|
-
return
|
|
5817
|
+
return Je(Ge(t), e, n, r);
|
|
5991
5818
|
}
|
|
5992
5819
|
function W(e, t, n, r) {
|
|
5993
|
-
return
|
|
5820
|
+
return Je(qe(t), e, n, r);
|
|
5994
5821
|
}
|
|
5995
5822
|
function G(e, t, n, r) {
|
|
5996
|
-
return
|
|
5823
|
+
return Je(Ke(t, e.length - n), e, n, r);
|
|
5997
5824
|
}
|
|
5998
5825
|
p.prototype.write = function(e, t, n, r) {
|
|
5999
5826
|
if (t === void 0) r = "utf8", n = this.length, t = 0;
|
|
@@ -6058,7 +5885,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6058
5885
|
for (var n = "", r = 0; r < t;) n += String.fromCharCode.apply(String, e.slice(r, r += Y));
|
|
6059
5886
|
return n;
|
|
6060
5887
|
}
|
|
6061
|
-
function
|
|
5888
|
+
function Ie(e, t, n) {
|
|
6062
5889
|
var r = "";
|
|
6063
5890
|
n = Math.min(e.length, n);
|
|
6064
5891
|
for (var a = t; a < n; ++a) r += String.fromCharCode(e[a] & 127);
|
|
@@ -6070,13 +5897,13 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6070
5897
|
for (var a = t; a < n; ++a) r += String.fromCharCode(e[a]);
|
|
6071
5898
|
return r;
|
|
6072
5899
|
}
|
|
6073
|
-
function
|
|
5900
|
+
function Le(e, t, n) {
|
|
6074
5901
|
var r = e.length;
|
|
6075
5902
|
(!t || t < 0) && (t = 0), (!n || n < 0 || n > r) && (n = r);
|
|
6076
|
-
for (var a = "", c = t; c < n; ++c) a +=
|
|
5903
|
+
for (var a = "", c = t; c < n; ++c) a += Ze[e[c]];
|
|
6077
5904
|
return a;
|
|
6078
5905
|
}
|
|
6079
|
-
function
|
|
5906
|
+
function Re(e, t, n) {
|
|
6080
5907
|
for (var r = e.slice(t, n), a = "", c = 0; c < r.length - 1; c += 2) a += String.fromCharCode(r[c] + r[c + 1] * 256);
|
|
6081
5908
|
return a;
|
|
6082
5909
|
}
|
|
@@ -6197,24 +6024,24 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6197
6024
|
}, p.prototype.writeInt32BE = function(e, t, n) {
|
|
6198
6025
|
return e = +e, t >>>= 0, n || $(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
6199
6026
|
};
|
|
6200
|
-
function
|
|
6027
|
+
function ze(e, t, n, r, a, c) {
|
|
6201
6028
|
if (n + r > e.length || n < 0) throw RangeError("Index out of range");
|
|
6202
6029
|
}
|
|
6203
|
-
function
|
|
6204
|
-
return t = +t, r >>>= 0, c ||
|
|
6030
|
+
function Be(e, t, r, a, c) {
|
|
6031
|
+
return t = +t, r >>>= 0, c || ze(e, t, r, 4, 34028234663852886e22, -34028234663852886e22), n.write(e, t, r, a, 23, 4), r + 4;
|
|
6205
6032
|
}
|
|
6206
6033
|
p.prototype.writeFloatLE = function(e, t, n) {
|
|
6207
|
-
return
|
|
6034
|
+
return Be(this, e, t, !0, n);
|
|
6208
6035
|
}, p.prototype.writeFloatBE = function(e, t, n) {
|
|
6209
|
-
return
|
|
6036
|
+
return Be(this, e, t, !1, n);
|
|
6210
6037
|
};
|
|
6211
|
-
function
|
|
6212
|
-
return t = +t, r >>>= 0, c ||
|
|
6038
|
+
function Ve(e, t, r, a, c) {
|
|
6039
|
+
return t = +t, r >>>= 0, c || ze(e, t, r, 8, 17976931348623157e292, -17976931348623157e292), n.write(e, t, r, a, 52, 8), r + 8;
|
|
6213
6040
|
}
|
|
6214
6041
|
p.prototype.writeDoubleLE = function(e, t, n) {
|
|
6215
|
-
return
|
|
6042
|
+
return Ve(this, e, t, !0, n);
|
|
6216
6043
|
}, p.prototype.writeDoubleBE = function(e, t, n) {
|
|
6217
|
-
return
|
|
6044
|
+
return Ve(this, e, t, !1, n);
|
|
6218
6045
|
}, p.prototype.copy = function(e, t, n, r) {
|
|
6219
6046
|
if (!p.isBuffer(e)) throw TypeError("argument should be a Buffer");
|
|
6220
6047
|
if (n ||= 0, !r && r !== 0 && (r = this.length), t >= e.length && (t = e.length), t ||= 0, r > 0 && r < n && (r = n), r === n || e.length === 0 || this.length === 0) return 0;
|
|
@@ -6245,13 +6072,13 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6245
6072
|
}
|
|
6246
6073
|
return this;
|
|
6247
6074
|
};
|
|
6248
|
-
var
|
|
6249
|
-
function
|
|
6250
|
-
if (e = e.split("=")[0], e = e.trim().replace(
|
|
6075
|
+
var He = /[^+/0-9A-Za-z-_]/g;
|
|
6076
|
+
function Ue(e) {
|
|
6077
|
+
if (e = e.split("=")[0], e = e.trim().replace(He, ""), e.length < 2) return "";
|
|
6251
6078
|
for (; e.length % 4 != 0;) e += "=";
|
|
6252
6079
|
return e;
|
|
6253
6080
|
}
|
|
6254
|
-
function
|
|
6081
|
+
function We(e, t) {
|
|
6255
6082
|
t ||= Infinity;
|
|
6256
6083
|
for (var n, r = e.length, a = null, c = [], l = 0; l < r; ++l) {
|
|
6257
6084
|
if (n = e.charCodeAt(l), n > 55295 && n < 57344) {
|
|
@@ -6288,28 +6115,28 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6288
6115
|
}
|
|
6289
6116
|
return c;
|
|
6290
6117
|
}
|
|
6291
|
-
function
|
|
6118
|
+
function Ge(e) {
|
|
6292
6119
|
for (var t = [], n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
|
|
6293
6120
|
return t;
|
|
6294
6121
|
}
|
|
6295
|
-
function
|
|
6122
|
+
function Ke(e, t) {
|
|
6296
6123
|
for (var n, r, a, c = [], l = 0; l < e.length && !((t -= 2) < 0); ++l) n = e.charCodeAt(l), r = n >> 8, a = n % 256, c.push(a), c.push(r);
|
|
6297
6124
|
return c;
|
|
6298
6125
|
}
|
|
6299
|
-
function
|
|
6300
|
-
return t.toByteArray(
|
|
6126
|
+
function qe(e) {
|
|
6127
|
+
return t.toByteArray(Ue(e));
|
|
6301
6128
|
}
|
|
6302
|
-
function
|
|
6129
|
+
function Je(e, t, n, r) {
|
|
6303
6130
|
for (var a = 0; a < r && !(a + n >= t.length || a >= e.length); ++a) t[a + n] = e[a];
|
|
6304
6131
|
return a;
|
|
6305
6132
|
}
|
|
6306
|
-
function
|
|
6133
|
+
function Ye(e, t) {
|
|
6307
6134
|
return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
|
|
6308
6135
|
}
|
|
6309
|
-
function
|
|
6136
|
+
function Xe(e) {
|
|
6310
6137
|
return e !== e;
|
|
6311
6138
|
}
|
|
6312
|
-
var
|
|
6139
|
+
var Ze = (function() {
|
|
6313
6140
|
for (var e = "0123456789abcdef", t = Array(256), n = 0; n < 16; ++n) for (var r = n * 16, a = 0; a < 16; ++a) t[r + a] = e[n] + e[a];
|
|
6314
6141
|
return t;
|
|
6315
6142
|
})();
|
|
@@ -6480,7 +6307,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6480
6307
|
}
|
|
6481
6308
|
t.s = r < 0 ? -1 : 0, r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r), t.t = n, t.clamp();
|
|
6482
6309
|
}
|
|
6483
|
-
function
|
|
6310
|
+
function Ie(e, t) {
|
|
6484
6311
|
var n = this.abs(), r = e.abs(), c = n.t;
|
|
6485
6312
|
for (t.t = c + r.t; --c >= 0;) t[c] = 0;
|
|
6486
6313
|
for (c = 0; c < r.t; ++c) t[c + n.t] = n.am(0, r[c], t, c, 0, n.t);
|
|
@@ -6494,7 +6321,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6494
6321
|
}
|
|
6495
6322
|
e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), e.s = 0, e.clamp();
|
|
6496
6323
|
}
|
|
6497
|
-
function
|
|
6324
|
+
function Le(e, t, n) {
|
|
6498
6325
|
var r = e.abs();
|
|
6499
6326
|
if (!(r.t <= 0)) {
|
|
6500
6327
|
var l = this.abs();
|
|
@@ -6517,7 +6344,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6517
6344
|
}
|
|
6518
6345
|
}
|
|
6519
6346
|
}
|
|
6520
|
-
function
|
|
6347
|
+
function Re(e) {
|
|
6521
6348
|
var t = c();
|
|
6522
6349
|
return this.abs().divRemTo(e, null, t), this.s < 0 && t.compareTo(a.ZERO) > 0 && e.subTo(t, t), t;
|
|
6523
6350
|
}
|
|
@@ -6527,38 +6354,38 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6527
6354
|
function $(e) {
|
|
6528
6355
|
return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
|
|
6529
6356
|
}
|
|
6530
|
-
function
|
|
6357
|
+
function ze(e) {
|
|
6531
6358
|
return e;
|
|
6532
6359
|
}
|
|
6533
|
-
function
|
|
6360
|
+
function Be(e) {
|
|
6534
6361
|
e.divRemTo(this.m, null, e);
|
|
6535
6362
|
}
|
|
6536
|
-
function
|
|
6363
|
+
function Ve(e, t, n) {
|
|
6537
6364
|
e.multiplyTo(t, n), this.reduce(n);
|
|
6538
6365
|
}
|
|
6539
|
-
function
|
|
6366
|
+
function He(e, t) {
|
|
6540
6367
|
e.squareTo(t), this.reduce(t);
|
|
6541
6368
|
}
|
|
6542
|
-
Q.prototype.convert = $, Q.prototype.revert =
|
|
6543
|
-
function
|
|
6369
|
+
Q.prototype.convert = $, Q.prototype.revert = ze, Q.prototype.reduce = Be, Q.prototype.mulTo = Ve, Q.prototype.sqrTo = He;
|
|
6370
|
+
function Ue() {
|
|
6544
6371
|
if (this.t < 1) return 0;
|
|
6545
6372
|
var e = this[0];
|
|
6546
6373
|
if (!(e & 1)) return 0;
|
|
6547
6374
|
var t = e & 3;
|
|
6548
6375
|
return t = t * (2 - (e & 15) * t) & 15, t = t * (2 - (e & 255) * t) & 255, t = t * (2 - ((e & 65535) * t & 65535)) & 65535, t = t * (2 - e * t % this.DV) % this.DV, t > 0 ? this.DV - t : -t;
|
|
6549
6376
|
}
|
|
6550
|
-
function
|
|
6377
|
+
function We(e) {
|
|
6551
6378
|
this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
|
|
6552
6379
|
}
|
|
6553
|
-
function
|
|
6380
|
+
function Ge(e) {
|
|
6554
6381
|
var t = c();
|
|
6555
6382
|
return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(a.ZERO) > 0 && this.m.subTo(t, t), t;
|
|
6556
6383
|
}
|
|
6557
|
-
function
|
|
6384
|
+
function Ke(e) {
|
|
6558
6385
|
var t = c();
|
|
6559
6386
|
return e.copyTo(t), this.reduce(t), t;
|
|
6560
6387
|
}
|
|
6561
|
-
function
|
|
6388
|
+
function qe(e) {
|
|
6562
6389
|
for (; e.t <= this.mt2;) e[e.t++] = 0;
|
|
6563
6390
|
for (var t = 0; t < this.m.t; ++t) {
|
|
6564
6391
|
var n = e[t] & 32767, r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
|
|
@@ -6566,17 +6393,17 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6566
6393
|
}
|
|
6567
6394
|
e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
|
|
6568
6395
|
}
|
|
6569
|
-
function
|
|
6396
|
+
function Je(e, t) {
|
|
6570
6397
|
e.squareTo(t), this.reduce(t);
|
|
6571
6398
|
}
|
|
6572
|
-
function
|
|
6399
|
+
function Ye(e, t, n) {
|
|
6573
6400
|
e.multiplyTo(t, n), this.reduce(n);
|
|
6574
6401
|
}
|
|
6575
|
-
|
|
6576
|
-
function
|
|
6402
|
+
We.prototype.convert = Ge, We.prototype.revert = Ke, We.prototype.reduce = qe, We.prototype.mulTo = Ye, We.prototype.sqrTo = Je;
|
|
6403
|
+
function Xe() {
|
|
6577
6404
|
return (this.t > 0 ? this[0] & 1 : this.s) == 0;
|
|
6578
6405
|
}
|
|
6579
|
-
function
|
|
6406
|
+
function Ze(e, t) {
|
|
6580
6407
|
if (e > 4294967295 || e < 1) return a.ONE;
|
|
6581
6408
|
var n = c(), r = c(), l = t.convert(this), p = U(e) - 1;
|
|
6582
6409
|
for (l.copyTo(n); --p >= 0;) if (t.sqrTo(n, r), (e & 1 << p) > 0) t.mulTo(r, l, n);
|
|
@@ -6586,16 +6413,16 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6586
6413
|
}
|
|
6587
6414
|
return t.revert(n);
|
|
6588
6415
|
}
|
|
6589
|
-
function
|
|
6590
|
-
var n = e < 256 || t.isEven() ? new Q(t) : new
|
|
6416
|
+
function Qe(e, t) {
|
|
6417
|
+
var n = e < 256 || t.isEven() ? new Q(t) : new We(t);
|
|
6591
6418
|
return this.exp(e, n);
|
|
6592
6419
|
}
|
|
6593
|
-
a.prototype.copyTo = M, a.prototype.fromInt = N, a.prototype.fromString = F, a.prototype.clamp = I, a.prototype.dlShiftTo = G, a.prototype.drShiftTo = K, a.prototype.lShiftTo = J, a.prototype.rShiftTo = Y, a.prototype.subTo = X, a.prototype.multiplyTo =
|
|
6594
|
-
function
|
|
6420
|
+
a.prototype.copyTo = M, a.prototype.fromInt = N, a.prototype.fromString = F, a.prototype.clamp = I, a.prototype.dlShiftTo = G, a.prototype.drShiftTo = K, a.prototype.lShiftTo = J, a.prototype.rShiftTo = Y, a.prototype.subTo = X, a.prototype.multiplyTo = Ie, a.prototype.squareTo = Z, a.prototype.divRemTo = Le, a.prototype.invDigit = Ue, a.prototype.isEven = Xe, a.prototype.exp = Ze, a.prototype.toString = R, a.prototype.negate = B, a.prototype.abs = V, a.prototype.compareTo = H, a.prototype.bitLength = W, a.prototype.mod = Re, a.prototype.modPowInt = Qe, a.ZERO = P(0), a.ONE = P(1);
|
|
6421
|
+
function $e() {
|
|
6595
6422
|
var e = c();
|
|
6596
6423
|
return this.copyTo(e), e;
|
|
6597
6424
|
}
|
|
6598
|
-
function
|
|
6425
|
+
function et() {
|
|
6599
6426
|
if (this.s < 0) {
|
|
6600
6427
|
if (this.t == 1) return this[0] - this.DV;
|
|
6601
6428
|
if (this.t == 0) return -1;
|
|
@@ -6603,25 +6430,25 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6603
6430
|
else if (this.t == 0) return 0;
|
|
6604
6431
|
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
|
|
6605
6432
|
}
|
|
6606
|
-
function
|
|
6433
|
+
function tt() {
|
|
6607
6434
|
return this.t == 0 ? this.s : this[0] << 24 >> 24;
|
|
6608
6435
|
}
|
|
6609
|
-
function
|
|
6436
|
+
function nt() {
|
|
6610
6437
|
return this.t == 0 ? this.s : this[0] << 16 >> 16;
|
|
6611
6438
|
}
|
|
6612
|
-
function
|
|
6439
|
+
function rt(e) {
|
|
6613
6440
|
return Math.floor(Math.LN2 * this.DB / Math.log(e));
|
|
6614
6441
|
}
|
|
6615
|
-
function
|
|
6442
|
+
function it() {
|
|
6616
6443
|
return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
|
|
6617
6444
|
}
|
|
6618
|
-
function
|
|
6445
|
+
function at(e) {
|
|
6619
6446
|
if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
|
|
6620
6447
|
var t = this.chunkSize(e), n = e ** +t, r = P(n), a = c(), l = c(), p = "";
|
|
6621
6448
|
for (this.divRemTo(r, a, l); a.signum() > 0;) p = (n + l.intValue()).toString(e).substr(1) + p, a.divRemTo(r, a, l);
|
|
6622
6449
|
return l.intValue().toString(e) + p;
|
|
6623
6450
|
}
|
|
6624
|
-
function
|
|
6451
|
+
function ot(e, t) {
|
|
6625
6452
|
this.fromInt(0), t ??= 10;
|
|
6626
6453
|
for (var n = this.chunkSize(t), r = t ** +n, c = !1, l = 0, p = 0, m = 0; m < e.length; ++m) {
|
|
6627
6454
|
var h = j(e, m);
|
|
@@ -6633,31 +6460,31 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6633
6460
|
}
|
|
6634
6461
|
l > 0 && (this.dMultiply(t ** +l), this.dAddOffset(p, 0)), c && a.ZERO.subTo(this, this);
|
|
6635
6462
|
}
|
|
6636
|
-
function
|
|
6463
|
+
function st(e, t, n) {
|
|
6637
6464
|
if (typeof t == "number") if (e < 2) this.fromInt(1);
|
|
6638
|
-
else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(a.ONE.shiftLeft(e - 1),
|
|
6465
|
+
else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(a.ONE.shiftLeft(e - 1), ht, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(a.ONE.shiftLeft(e - 1), this);
|
|
6639
6466
|
else {
|
|
6640
6467
|
var r = [], c = e & 7;
|
|
6641
6468
|
r.length = (e >> 3) + 1, t.nextBytes(r), c > 0 ? r[0] &= (1 << c) - 1 : r[0] = 0, this.fromString(r, 256);
|
|
6642
6469
|
}
|
|
6643
6470
|
}
|
|
6644
|
-
function
|
|
6471
|
+
function ct() {
|
|
6645
6472
|
var e = this.t, t = [];
|
|
6646
6473
|
t[0] = this.s;
|
|
6647
6474
|
var n = this.DB - e * this.DB % 8, r, a = 0;
|
|
6648
6475
|
if (e-- > 0) for (n < this.DB && (r = this[e] >> n) != (this.s & this.DM) >> n && (t[a++] = r | this.s << this.DB - n); e >= 0;) n < 8 ? (r = (this[e] & (1 << n) - 1) << 8 - n, r |= this[--e] >> (n += this.DB - 8)) : (r = this[e] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --e)), r & 128 && (r |= -256), a == 0 && (this.s & 128) != (r & 128) && ++a, (a > 0 || r != this.s) && (t[a++] = r);
|
|
6649
6476
|
return t;
|
|
6650
6477
|
}
|
|
6651
|
-
function
|
|
6478
|
+
function lt(e) {
|
|
6652
6479
|
return this.compareTo(e) == 0;
|
|
6653
6480
|
}
|
|
6654
|
-
function
|
|
6481
|
+
function ut(e) {
|
|
6655
6482
|
return this.compareTo(e) < 0 ? this : e;
|
|
6656
6483
|
}
|
|
6657
|
-
function
|
|
6484
|
+
function dt(e) {
|
|
6658
6485
|
return this.compareTo(e) > 0 ? this : e;
|
|
6659
6486
|
}
|
|
6660
|
-
function
|
|
6487
|
+
function ft(e, t, n) {
|
|
6661
6488
|
var r, a, c = Math.min(e.t, this.t);
|
|
6662
6489
|
for (r = 0; r < c; ++r) n[r] = t(this[r], e[r]);
|
|
6663
6490
|
if (e.t < this.t) {
|
|
@@ -6669,81 +6496,81 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6669
6496
|
}
|
|
6670
6497
|
n.s = t(this.s, e.s), n.clamp();
|
|
6671
6498
|
}
|
|
6672
|
-
function
|
|
6499
|
+
function pt(e, t) {
|
|
6673
6500
|
return e & t;
|
|
6674
6501
|
}
|
|
6675
|
-
function
|
|
6502
|
+
function mt(e) {
|
|
6676
6503
|
var t = c();
|
|
6677
|
-
return this.bitwiseTo(e,
|
|
6504
|
+
return this.bitwiseTo(e, pt, t), t;
|
|
6678
6505
|
}
|
|
6679
|
-
function
|
|
6506
|
+
function ht(e, t) {
|
|
6680
6507
|
return e | t;
|
|
6681
6508
|
}
|
|
6682
|
-
function
|
|
6509
|
+
function gt(e) {
|
|
6683
6510
|
var t = c();
|
|
6684
|
-
return this.bitwiseTo(e,
|
|
6511
|
+
return this.bitwiseTo(e, ht, t), t;
|
|
6685
6512
|
}
|
|
6686
|
-
function
|
|
6513
|
+
function _t(e, t) {
|
|
6687
6514
|
return e ^ t;
|
|
6688
6515
|
}
|
|
6689
|
-
function
|
|
6516
|
+
function vt(e) {
|
|
6690
6517
|
var t = c();
|
|
6691
|
-
return this.bitwiseTo(e,
|
|
6518
|
+
return this.bitwiseTo(e, _t, t), t;
|
|
6692
6519
|
}
|
|
6693
|
-
function
|
|
6520
|
+
function yt(e, t) {
|
|
6694
6521
|
return e & ~t;
|
|
6695
6522
|
}
|
|
6696
|
-
function
|
|
6523
|
+
function bt(e) {
|
|
6697
6524
|
var t = c();
|
|
6698
|
-
return this.bitwiseTo(e,
|
|
6525
|
+
return this.bitwiseTo(e, yt, t), t;
|
|
6699
6526
|
}
|
|
6700
|
-
function
|
|
6527
|
+
function xt() {
|
|
6701
6528
|
for (var e = c(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
|
|
6702
6529
|
return e.t = this.t, e.s = ~this.s, e;
|
|
6703
6530
|
}
|
|
6704
|
-
function
|
|
6531
|
+
function St(e) {
|
|
6705
6532
|
var t = c();
|
|
6706
6533
|
return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
|
|
6707
6534
|
}
|
|
6708
|
-
function
|
|
6535
|
+
function Ct(e) {
|
|
6709
6536
|
var t = c();
|
|
6710
6537
|
return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
|
|
6711
6538
|
}
|
|
6712
|
-
function
|
|
6539
|
+
function wt(e) {
|
|
6713
6540
|
if (e == 0) return -1;
|
|
6714
6541
|
var t = 0;
|
|
6715
6542
|
return e & 65535 || (e >>= 16, t += 16), e & 255 || (e >>= 8, t += 8), e & 15 || (e >>= 4, t += 4), e & 3 || (e >>= 2, t += 2), e & 1 || ++t, t;
|
|
6716
6543
|
}
|
|
6717
|
-
function
|
|
6718
|
-
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB +
|
|
6544
|
+
function Tt() {
|
|
6545
|
+
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + wt(this[e]);
|
|
6719
6546
|
return this.s < 0 ? this.t * this.DB : -1;
|
|
6720
6547
|
}
|
|
6721
|
-
function
|
|
6548
|
+
function Et(e) {
|
|
6722
6549
|
for (var t = 0; e != 0;) e &= e - 1, ++t;
|
|
6723
6550
|
return t;
|
|
6724
6551
|
}
|
|
6725
|
-
function
|
|
6726
|
-
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e +=
|
|
6552
|
+
function Dt() {
|
|
6553
|
+
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += Et(this[n] ^ t);
|
|
6727
6554
|
return e;
|
|
6728
6555
|
}
|
|
6729
|
-
function
|
|
6556
|
+
function Ot(e) {
|
|
6730
6557
|
var t = Math.floor(e / this.DB);
|
|
6731
6558
|
return t >= this.t ? this.s != 0 : (this[t] & 1 << e % this.DB) != 0;
|
|
6732
6559
|
}
|
|
6733
|
-
function
|
|
6560
|
+
function kt(e, t) {
|
|
6734
6561
|
var n = a.ONE.shiftLeft(e);
|
|
6735
6562
|
return this.bitwiseTo(n, t, n), n;
|
|
6736
6563
|
}
|
|
6737
|
-
function
|
|
6738
|
-
return this.changeBit(e,
|
|
6564
|
+
function At(e) {
|
|
6565
|
+
return this.changeBit(e, ht);
|
|
6739
6566
|
}
|
|
6740
|
-
function
|
|
6741
|
-
return this.changeBit(e,
|
|
6567
|
+
function jt(e) {
|
|
6568
|
+
return this.changeBit(e, yt);
|
|
6742
6569
|
}
|
|
6743
|
-
function
|
|
6744
|
-
return this.changeBit(e,
|
|
6570
|
+
function Mt(e) {
|
|
6571
|
+
return this.changeBit(e, _t);
|
|
6745
6572
|
}
|
|
6746
|
-
function
|
|
6573
|
+
function Nt(e, t) {
|
|
6747
6574
|
for (var n = 0, r = 0, a = Math.min(e.t, this.t); n < a;) r += this[n] + e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
6748
6575
|
if (e.t < this.t) {
|
|
6749
6576
|
for (r += e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
@@ -6754,58 +6581,58 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6754
6581
|
}
|
|
6755
6582
|
t.s = r < 0 ? -1 : 0, r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r), t.t = n, t.clamp();
|
|
6756
6583
|
}
|
|
6757
|
-
function
|
|
6584
|
+
function Pt(e) {
|
|
6758
6585
|
var t = c();
|
|
6759
6586
|
return this.addTo(e, t), t;
|
|
6760
6587
|
}
|
|
6761
|
-
function
|
|
6588
|
+
function Ft(e) {
|
|
6762
6589
|
var t = c();
|
|
6763
6590
|
return this.subTo(e, t), t;
|
|
6764
6591
|
}
|
|
6765
|
-
function
|
|
6592
|
+
function It(e) {
|
|
6766
6593
|
var t = c();
|
|
6767
6594
|
return this.multiplyTo(e, t), t;
|
|
6768
6595
|
}
|
|
6769
|
-
function
|
|
6596
|
+
function Lt() {
|
|
6770
6597
|
var e = c();
|
|
6771
6598
|
return this.squareTo(e), e;
|
|
6772
6599
|
}
|
|
6773
|
-
function
|
|
6600
|
+
function Rt(e) {
|
|
6774
6601
|
var t = c();
|
|
6775
6602
|
return this.divRemTo(e, t, null), t;
|
|
6776
6603
|
}
|
|
6777
|
-
function
|
|
6604
|
+
function zt(e) {
|
|
6778
6605
|
var t = c();
|
|
6779
6606
|
return this.divRemTo(e, null, t), t;
|
|
6780
6607
|
}
|
|
6781
|
-
function
|
|
6608
|
+
function Bt(e) {
|
|
6782
6609
|
var t = c(), n = c();
|
|
6783
6610
|
return this.divRemTo(e, t, n), [t, n];
|
|
6784
6611
|
}
|
|
6785
|
-
function
|
|
6612
|
+
function Vt(e) {
|
|
6786
6613
|
this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
|
|
6787
6614
|
}
|
|
6788
|
-
function
|
|
6615
|
+
function Ht(e, t) {
|
|
6789
6616
|
if (e != 0) {
|
|
6790
6617
|
for (; this.t <= t;) this[this.t++] = 0;
|
|
6791
6618
|
for (this[t] += e; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
|
|
6792
6619
|
}
|
|
6793
6620
|
}
|
|
6794
|
-
function
|
|
6795
|
-
function
|
|
6621
|
+
function Ut() {}
|
|
6622
|
+
function Wt(e) {
|
|
6796
6623
|
return e;
|
|
6797
6624
|
}
|
|
6798
|
-
function
|
|
6625
|
+
function Gt(e, t, n) {
|
|
6799
6626
|
e.multiplyTo(t, n);
|
|
6800
6627
|
}
|
|
6801
|
-
function
|
|
6628
|
+
function Kt(e, t) {
|
|
6802
6629
|
e.squareTo(t);
|
|
6803
6630
|
}
|
|
6804
|
-
|
|
6805
|
-
function
|
|
6806
|
-
return this.exp(e, new
|
|
6631
|
+
Ut.prototype.convert = Wt, Ut.prototype.revert = Wt, Ut.prototype.mulTo = Gt, Ut.prototype.sqrTo = Kt;
|
|
6632
|
+
function qt(e) {
|
|
6633
|
+
return this.exp(e, new Ut());
|
|
6807
6634
|
}
|
|
6808
|
-
function
|
|
6635
|
+
function Jt(e, t, n) {
|
|
6809
6636
|
var r = Math.min(this.t + e.t, t);
|
|
6810
6637
|
for (n.s = 0, n.t = r; r > 0;) n[--r] = 0;
|
|
6811
6638
|
var a;
|
|
@@ -6813,40 +6640,40 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6813
6640
|
for (a = Math.min(e.t, t); r < a; ++r) this.am(0, e[r], n, r, 0, t - r);
|
|
6814
6641
|
n.clamp();
|
|
6815
6642
|
}
|
|
6816
|
-
function
|
|
6643
|
+
function Yt(e, t, n) {
|
|
6817
6644
|
--t;
|
|
6818
6645
|
var r = n.t = this.t + e.t - t;
|
|
6819
6646
|
for (n.s = 0; --r >= 0;) n[r] = 0;
|
|
6820
6647
|
for (r = Math.max(t - this.t, 0); r < e.t; ++r) n[this.t + r - t] = this.am(t - r, e[r], n, 0, 0, this.t + r - t);
|
|
6821
6648
|
n.clamp(), n.drShiftTo(1, n);
|
|
6822
6649
|
}
|
|
6823
|
-
function
|
|
6650
|
+
function Xt(e) {
|
|
6824
6651
|
this.r2 = c(), this.q3 = c(), a.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e), this.m = e;
|
|
6825
6652
|
}
|
|
6826
|
-
function
|
|
6653
|
+
function Zt(e) {
|
|
6827
6654
|
if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
|
|
6828
6655
|
if (e.compareTo(this.m) < 0) return e;
|
|
6829
6656
|
var t = c();
|
|
6830
6657
|
return e.copyTo(t), this.reduce(t), t;
|
|
6831
6658
|
}
|
|
6832
|
-
function
|
|
6659
|
+
function Qt(e) {
|
|
6833
6660
|
return e;
|
|
6834
6661
|
}
|
|
6835
|
-
function
|
|
6662
|
+
function $t(e) {
|
|
6836
6663
|
for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && (e.t = this.m.t + 1, e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0;) e.dAddOffset(1, this.m.t + 1);
|
|
6837
6664
|
for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;) e.subTo(this.m, e);
|
|
6838
6665
|
}
|
|
6839
|
-
function
|
|
6666
|
+
function en(e, t) {
|
|
6840
6667
|
e.squareTo(t), this.reduce(t);
|
|
6841
6668
|
}
|
|
6842
|
-
function
|
|
6669
|
+
function tn(e, t, n) {
|
|
6843
6670
|
e.multiplyTo(t, n), this.reduce(n);
|
|
6844
6671
|
}
|
|
6845
|
-
|
|
6846
|
-
function
|
|
6672
|
+
Xt.prototype.convert = Zt, Xt.prototype.revert = Qt, Xt.prototype.reduce = $t, Xt.prototype.mulTo = tn, Xt.prototype.sqrTo = en;
|
|
6673
|
+
function nn(e, t) {
|
|
6847
6674
|
var n = e.bitLength(), r, a = P(1), l;
|
|
6848
6675
|
if (n <= 0) return a;
|
|
6849
|
-
r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, l = n < 8 ? new Q(t) : t.isEven() ? new
|
|
6676
|
+
r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, l = n < 8 ? new Q(t) : t.isEven() ? new Xt(t) : new We(t);
|
|
6850
6677
|
var p = [], m = 3, h = r - 1, g = (1 << r) - 1;
|
|
6851
6678
|
if (p[1] = l.convert(this), r > 1) {
|
|
6852
6679
|
var v = c();
|
|
@@ -6864,7 +6691,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6864
6691
|
}
|
|
6865
6692
|
return l.revert(a);
|
|
6866
6693
|
}
|
|
6867
|
-
function
|
|
6694
|
+
function rn(e) {
|
|
6868
6695
|
var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone();
|
|
6869
6696
|
if (t.compareTo(n) < 0) {
|
|
6870
6697
|
var r = t;
|
|
@@ -6875,14 +6702,14 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6875
6702
|
for (a < c && (c = a), c > 0 && (t.rShiftTo(c, t), n.rShiftTo(c, n)); t.signum() > 0;) (a = t.getLowestSetBit()) > 0 && t.rShiftTo(a, t), (a = n.getLowestSetBit()) > 0 && n.rShiftTo(a, n), t.compareTo(n) >= 0 ? (t.subTo(n, t), t.rShiftTo(1, t)) : (n.subTo(t, n), n.rShiftTo(1, n));
|
|
6876
6703
|
return c > 0 && n.lShiftTo(c, n), n;
|
|
6877
6704
|
}
|
|
6878
|
-
function
|
|
6705
|
+
function an(e) {
|
|
6879
6706
|
if (e <= 0) return 0;
|
|
6880
6707
|
var t = this.DV % e, n = this.s < 0 ? e - 1 : 0;
|
|
6881
6708
|
if (this.t > 0) if (t == 0) n = this[0] % e;
|
|
6882
6709
|
else for (var r = this.t - 1; r >= 0; --r) n = (t * n + this[r]) % e;
|
|
6883
6710
|
return n;
|
|
6884
6711
|
}
|
|
6885
|
-
function
|
|
6712
|
+
function on(e) {
|
|
6886
6713
|
var t = e.isEven();
|
|
6887
6714
|
if (this.isEven() && t || e.signum() == 0) return a.ZERO;
|
|
6888
6715
|
for (var n = e.clone(), r = this.clone(), c = P(1), l = P(0), p = P(0), m = P(1); n.signum() != 0;) {
|
|
@@ -6896,7 +6723,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
6896
6723
|
else return m;
|
|
6897
6724
|
return m.signum() < 0 ? m.add(e) : m;
|
|
6898
6725
|
}
|
|
6899
|
-
var
|
|
6726
|
+
var sn = [
|
|
6900
6727
|
2,
|
|
6901
6728
|
3,
|
|
6902
6729
|
5,
|
|
@@ -7065,27 +6892,27 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
7065
6892
|
983,
|
|
7066
6893
|
991,
|
|
7067
6894
|
997
|
|
7068
|
-
],
|
|
7069
|
-
function
|
|
6895
|
+
], cn = (1 << 26) / sn[sn.length - 1];
|
|
6896
|
+
function ln(e) {
|
|
7070
6897
|
var t, n = this.abs();
|
|
7071
|
-
if (n.t == 1 && n[0] <=
|
|
7072
|
-
for (t = 0; t <
|
|
6898
|
+
if (n.t == 1 && n[0] <= sn[sn.length - 1]) {
|
|
6899
|
+
for (t = 0; t < sn.length; ++t) if (n[0] == sn[t]) return !0;
|
|
7073
6900
|
return !1;
|
|
7074
6901
|
}
|
|
7075
6902
|
if (n.isEven()) return !1;
|
|
7076
|
-
for (t = 1; t <
|
|
7077
|
-
for (var r =
|
|
7078
|
-
for (r = n.modInt(r); t < a;) if (r %
|
|
6903
|
+
for (t = 1; t < sn.length;) {
|
|
6904
|
+
for (var r = sn[t], a = t + 1; a < sn.length && r < cn;) r *= sn[a++];
|
|
6905
|
+
for (r = n.modInt(r); t < a;) if (r % sn[t++] == 0) return !1;
|
|
7079
6906
|
}
|
|
7080
6907
|
return n.millerRabin(e);
|
|
7081
6908
|
}
|
|
7082
|
-
function
|
|
6909
|
+
function un(e) {
|
|
7083
6910
|
var t = this.subtract(a.ONE), n = t.getLowestSetBit();
|
|
7084
6911
|
if (n <= 0) return !1;
|
|
7085
6912
|
var r = t.shiftRight(n);
|
|
7086
|
-
e = e + 1 >> 1, e >
|
|
6913
|
+
e = e + 1 >> 1, e > sn.length && (e = sn.length);
|
|
7087
6914
|
for (var l = c(), p = 0; p < e; ++p) {
|
|
7088
|
-
l.fromInt(
|
|
6915
|
+
l.fromInt(sn[Math.floor(Math.random() * sn.length)]);
|
|
7089
6916
|
var m = l.modPow(r, this);
|
|
7090
6917
|
if (m.compareTo(a.ONE) != 0 && m.compareTo(t) != 0) {
|
|
7091
6918
|
for (var h = 1; h++ < n && m.compareTo(t) != 0;) if (m = m.modPowInt(2, this), m.compareTo(a.ONE) == 0) return !1;
|
|
@@ -7094,67 +6921,67 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
|
7094
6921
|
}
|
|
7095
6922
|
return !0;
|
|
7096
6923
|
}
|
|
7097
|
-
a.prototype.chunkSize =
|
|
7098
|
-
var
|
|
7099
|
-
function
|
|
7100
|
-
|
|
6924
|
+
a.prototype.chunkSize = rt, a.prototype.toRadix = at, a.prototype.fromRadix = ot, a.prototype.fromNumber = st, a.prototype.bitwiseTo = ft, a.prototype.changeBit = kt, a.prototype.addTo = Nt, a.prototype.dMultiply = Vt, a.prototype.dAddOffset = Ht, a.prototype.multiplyLowerTo = Jt, a.prototype.multiplyUpperTo = Yt, a.prototype.modInt = an, a.prototype.millerRabin = un, a.prototype.clone = $e, a.prototype.intValue = et, a.prototype.byteValue = tt, a.prototype.shortValue = nt, a.prototype.signum = it, a.prototype.toByteArray = ct, a.prototype.equals = lt, a.prototype.min = ut, a.prototype.max = dt, a.prototype.and = mt, a.prototype.or = gt, a.prototype.xor = vt, a.prototype.andNot = bt, a.prototype.not = xt, a.prototype.shiftLeft = St, a.prototype.shiftRight = Ct, a.prototype.getLowestSetBit = Tt, a.prototype.bitCount = Dt, a.prototype.testBit = Ot, a.prototype.setBit = At, a.prototype.clearBit = jt, a.prototype.flipBit = Mt, a.prototype.add = Pt, a.prototype.subtract = Ft, a.prototype.multiply = It, a.prototype.divide = Rt, a.prototype.remainder = zt, a.prototype.divideAndRemainder = Bt, a.prototype.modPow = nn, a.prototype.modInverse = on, a.prototype.pow = qt, a.prototype.gcd = rn, a.prototype.isProbablePrime = ln, a.prototype.square = Lt, a.prototype.Barrett = Xt;
|
|
6925
|
+
var dn, fn, pn;
|
|
6926
|
+
function mn(e) {
|
|
6927
|
+
fn[pn++] ^= e & 255, fn[pn++] ^= e >> 8 & 255, fn[pn++] ^= e >> 16 & 255, fn[pn++] ^= e >> 24 & 255, pn >= En && (pn -= En);
|
|
7101
6928
|
}
|
|
7102
|
-
function
|
|
7103
|
-
|
|
6929
|
+
function hn() {
|
|
6930
|
+
mn((/* @__PURE__ */ new Date()).getTime());
|
|
7104
6931
|
}
|
|
7105
|
-
if (
|
|
7106
|
-
|
|
7107
|
-
var
|
|
6932
|
+
if (fn == null) {
|
|
6933
|
+
fn = [], pn = 0;
|
|
6934
|
+
var gn;
|
|
7108
6935
|
if (typeof window < "u" && window.crypto) {
|
|
7109
6936
|
if (window.crypto.getRandomValues) {
|
|
7110
|
-
var
|
|
7111
|
-
for (window.crypto.getRandomValues(
|
|
6937
|
+
var _n = new Uint8Array(32);
|
|
6938
|
+
for (window.crypto.getRandomValues(_n), gn = 0; gn < 32; ++gn) fn[pn++] = _n[gn];
|
|
7112
6939
|
} else if (navigator.appName == "Netscape" && navigator.appVersion < "5") {
|
|
7113
|
-
var
|
|
7114
|
-
for (
|
|
6940
|
+
var vn = window.crypto.random(32);
|
|
6941
|
+
for (gn = 0; gn < vn.length; ++gn) fn[pn++] = vn.charCodeAt(gn) & 255;
|
|
7115
6942
|
}
|
|
7116
6943
|
}
|
|
7117
|
-
for (;
|
|
7118
|
-
|
|
6944
|
+
for (; pn < En;) gn = Math.floor(65536 * Math.random()), fn[pn++] = gn >>> 8, fn[pn++] = gn & 255;
|
|
6945
|
+
pn = 0, hn();
|
|
7119
6946
|
}
|
|
7120
|
-
function
|
|
7121
|
-
if (
|
|
7122
|
-
for (
|
|
7123
|
-
|
|
6947
|
+
function yn() {
|
|
6948
|
+
if (dn == null) {
|
|
6949
|
+
for (hn(), dn = Tn(), dn.init(fn), pn = 0; pn < fn.length; ++pn) fn[pn] = 0;
|
|
6950
|
+
pn = 0;
|
|
7124
6951
|
}
|
|
7125
|
-
return
|
|
6952
|
+
return dn.next();
|
|
7126
6953
|
}
|
|
7127
|
-
function
|
|
6954
|
+
function bn(e) {
|
|
7128
6955
|
var t;
|
|
7129
|
-
for (t = 0; t < e.length; ++t) e[t] =
|
|
6956
|
+
for (t = 0; t < e.length; ++t) e[t] = yn();
|
|
7130
6957
|
}
|
|
7131
|
-
function
|
|
7132
|
-
|
|
7133
|
-
function
|
|
6958
|
+
function xn() {}
|
|
6959
|
+
xn.prototype.nextBytes = bn;
|
|
6960
|
+
function Sn() {
|
|
7134
6961
|
this.i = 0, this.j = 0, this.S = [];
|
|
7135
6962
|
}
|
|
7136
|
-
function
|
|
6963
|
+
function Cn(e) {
|
|
7137
6964
|
var t, n, r;
|
|
7138
6965
|
for (t = 0; t < 256; ++t) this.S[t] = t;
|
|
7139
6966
|
for (n = 0, t = 0; t < 256; ++t) n = n + this.S[t] + e[t % e.length] & 255, r = this.S[t], this.S[t] = this.S[n], this.S[n] = r;
|
|
7140
6967
|
this.i = 0, this.j = 0;
|
|
7141
6968
|
}
|
|
7142
|
-
function
|
|
6969
|
+
function wn() {
|
|
7143
6970
|
var e;
|
|
7144
6971
|
return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, e = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = e, this.S[e + this.S[this.i] & 255];
|
|
7145
6972
|
}
|
|
7146
|
-
|
|
7147
|
-
function
|
|
7148
|
-
return new
|
|
6973
|
+
Sn.prototype.init = Cn, Sn.prototype.next = wn;
|
|
6974
|
+
function Tn() {
|
|
6975
|
+
return new Sn();
|
|
7149
6976
|
}
|
|
7150
|
-
var
|
|
6977
|
+
var En = 256;
|
|
7151
6978
|
e === void 0 ? this.jsbn = {
|
|
7152
6979
|
BigInteger: a,
|
|
7153
|
-
SecureRandom:
|
|
6980
|
+
SecureRandom: xn
|
|
7154
6981
|
} : e = t.exports = {
|
|
7155
6982
|
default: a,
|
|
7156
6983
|
BigInteger: a,
|
|
7157
|
-
SecureRandom:
|
|
6984
|
+
SecureRandom: xn
|
|
7158
6985
|
};
|
|
7159
6986
|
}).call(e);
|
|
7160
6987
|
})), import_to_arraybuffer = /* @__PURE__ */ __toESM(require_to_arraybuffer()), import_buffer = require_buffer(), import_jsbn = require_jsbn(), i = import_jsbn.BigInteger.prototype.Barrett;
|