[JavaScript] 纯文本查看 复制代码
/*
本段JS代码由乐易助手生成!助手下载地址:https://www.leybc.com/thread-7123-1-1.hml
请勿用于非法用途,产生后果均有使用者自负!
*/
window = this;
navigator = {}; //如果需要用到浏览器协议头,请在<加载代码> 按钮 右侧选择 navigator.js
! function(e) {
"use strict";
var t = "0123456789abcdefghijklmnopqrstuvwxyz";
function n(e) {
return t.charAt(e)
}
function i(e, t) {
return e & t
}
function a(e, t) {
return e | t
}
function o(e, t) {
return e ^ t
}
function s(e, t) {
return e & ~t
}
function r(e) {
if (0 == e) return -1;
var t = 0;
return 0 == (65535 & e) && (e >>= 16,
t += 16),
0 == (255 & e) && (e >>= 8,
t += 8),
0 == (15 & e) && (e >>= 4,
t += 4),
0 == (3 & e) && (e >>= 2,
t += 2),
0 == (1 & e) && ++t,
t
}
function c(e) {
for (var t = 0; 0 != e;)
e &= e - 1, ++t;
return t
}
var d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
function l(e) {
var t, n, i = "";
for (t = 0; t + 3 <= e.length; t += 3)
n = parseInt(e.substring(t, t + 3), 16),
i += d.charAt(n >> 6) + d.charAt(63 & n);
for (t + 1 == e.length ? (n = parseInt(e.substring(t, t + 1), 16),
i += d.charAt(n << 2)) : t + 2 == e.length && (n = parseInt(e.substring(t, t + 2), 16),
i += d.charAt(n >> 2) + d.charAt((3 & n) << 4)); 0 < (3 & i.length);)
i += "=";
return i
}
function u(e) {
var t, i = "",
a = 0,
o = 0;
for (t = 0; t < e.length && "=" != e.charAt(t); ++t) {
var s = d.indexOf(e.charAt(t));
s < 0 || (0 == a ? (i += n(s >> 2),
o = 3 & s,
a = 1) : 1 == a ? (i += n(o << 2 | s >> 4),
o = 15 & s,
a = 2) : 2 == a ? (i += n(o),
i += n(s >> 2),
o = 3 & s,
a = 3) : (i += n(o << 2 | s >> 4),
i += n(15 & s),
a = 0))
}
return 1 == a && (i += n(o << 2)),
i
}
var h, p, m = function(e, t) {
return (m = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var n in t)
t.hasOwnProperty(n) && (e[n] = t[n])
})(e, t)
}, f = function(e) {
var t;
if (void 0 === h) {
var n = "0123456789ABCDEF",
i = " \f\n\r\t?\u2028\u2029";
for (h = {},
t = 0; t < 16; ++t)
h[n.charAt(t)] = t;
for (n = n.toLowerCase(),
t = 10; t < 16; ++t)
h[n.charAt(t)] = t;
for (t = 0; t < i.length; ++t)
h[i.charAt(t)] = -1
}
var a = [],
o = 0,
s = 0;
for (t = 0; t < e.length; ++t) {
var r = e.charAt(t);
if ("=" == r) break;
if (-1 != (r = h[r])) {
if (void 0 === r) throw new Error("Illegal character at offset " + t);
o |= r,
2 <= ++s ? (a[a.length] = o,
s = o = 0) : o <<= 4
}
}
if (s) throw new Error("Hex encoding incomplete: 4 bits missing");
return a
}, g = {
decode: function(e) {
var t;
if (void 0 === p) {
var n = "= \f\n\r\t?\u2028\u2029";
for (p = {},
t = 0; t < 64; ++t)
p["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)] = t;
for (t = 0; t < n.length; ++t)
p[n.charAt(t)] = -1
}
var i = [],
a = 0,
o = 0;
for (t = 0; t < e.length; ++t) {
var s = e.charAt(t);
if ("=" == s) break;
if (-1 != (s = p)) {
if (void 0 === s) throw new Error("Illegal character at offset " + t);
a |= s,
4 <= ++o ? (i[i.length] = a >> 16,
i[i.length] = a >> 8 & 255,
i[i.length] = 255 & a,
o = a = 0) : a <<= 6
}
}
switch (o) {
case 1:
throw new Error("Base64 encoding incomplete: at least 2 bits missing");
case 2:
i[i.length] = a >> 10;
break;
case 3:
i[i.length] = a >> 16,
i[i.length] = a >> 8 & 255
}
return i
},
re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
unarmor: function(e) {
var t = g.re.exec(e);
if (t) if (t[1]) e = t[1];
else {
if (!t[2]) throw new Error("RegExp out of sync");
e = t[2]
}
return g.decode(e)
}
}, C = 1e13,
v = function() {
function e(e) {
this.buf = [+e || 0]
}
return e.prototype.mulAdd = function(e, t) {
var n, i, a = this.buf,
o = a.length;
for (n = 0; n < o; ++n)
(i = a[n] * e + t) < C ? t = 0 : i -= (t = 0 | i / C) * C,
a[n] = i;
0 < t && (a[n] = t)
},
e.prototype.sub = function(e) {
var t, n, i = this.buf,
a = i.length;
for (t = 0; t < a; ++t)
(n = i[t] - e) < 0 ? (n += C,
e = 1) : e = 0,
i[t] = n;
for (; 0 === i[i.length - 1];)
i.pop()
},
e.prototype.toString = function(e) {
if (10 != (e || 10)) throw new Error("only base 10 is supported");
for (var t = this.buf, n = t[t.length - 1].toString(), i = t.length - 2; 0 <= i; --i)
n += (C + t).toString().substring(1);
return n
},
e.prototype.valueOf = function() {
for (var e = this.buf, t = 0, n = e.length - 1; 0 <= n; --n)
t = t * C + e[n];
return t
},
e.prototype.simplify = function() {
var e = this.buf;
return 1 == e.length ? e[0] : this
},
e
}(),
y = "…",
b = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,
w = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
function E(e, t) {
return e.length > t && (e = e.substring(0, t) + y),
e
}
var S, x = function() {
function e(t, n) {
this.hexDigits = "0123456789ABCDEF",
t instanceof e ? (this.enc = t.enc,
this.pos = t.pos) : (this.enc = t,
this.pos = n)
}
return e.prototype.get = function(e) {
if (void 0 === e && (e = this.pos++),
e >= this.enc.length) throw new Error("Requesting byte offset " + e + " on a stream of length " + this.enc.length);
return "string" == typeof this.enc ? this.enc.charCodeAt(e) : this.enc[e]
},
e.prototype.hexByte = function(e) {
return this.hexDigits.charAt(e >> 4 & 15) + this.hexDigits.charAt(15 & e)
},
e.prototype.hexDump = function(e, t, n) {
for (var i = "", a = e; a < t; ++a)
if (i += this.hexByte(this.get(a)), !0 !== n) switch (15 & a) {
case 7:
i += " ";
break;
case 15:
i += "\n";
break;
default:
i += " "
}
return i
},
e.prototype.isASCII = function(e, t) {
for (var n = e; n < t; ++n) {
var i = this.get(n);
if (i < 32 || 176 < i) return !1
}
return !0
},
e.prototype.parseStringISO = function(e, t) {
for (var n = "", i = e; i < t; ++i)
n += String.fromCharCode(this.get(i));
return n
},
e.prototype.parseStringUTF = function(e, t) {
for (var n = "", i = e; i < t;) {
var a = this.get(i++);
n += a < 128 ? String.fromCharCode(a) : 191 < a && a < 224 ? String.fromCharCode((31 & a) << 6 | 63 & this.get(i++)) : String.fromCharCode((15 & a) << 12 | (63 & this.get(i++)) << 6 | 63 & this.get(i++))
}
return n
},
e.prototype.parseStringBMP = function(e, t) {
for (var n, i, a = "", o = e; o < t;)
n = this.get(o++),
i = this.get(o++),
a += String.fromCharCode(n << 8 | i);
return a
},
e.prototype.parseTime = function(e, t, n) {
var i = this.parseStringISO(e, t),
a = (n ? b : w).exec(i);
return a ? (n && (a[1] = +a[1],
a[1] += +a[1] < 70 ? 2e3 : 1900),
i = a[1] + "-" + a[2] + "-" + a[3] + " " + a[4],
a[5] && (i += ":" + a[5],
a[6] && (i += ":" + a[6],
a[7] && (i += "." + a[7]))),
a[8] && (i += " UTC",
"Z" != a[8] && (i += a[8],
a[9] && (i += ":" + a[9]))),
i) : "Unrecognized time: " + i
},
e.prototype.parseInteger = function(e, t) {
for (var n, i = this.get(e), a = 127 < i, o = a ? 255 : 0, s = ""; i == o && ++e < t;)
i = this.get(e);
if (0 === (n = t - e)) return a ? -1 : 0;
if (4 < n) {
for (s = i,
n <<= 3; 0 == (128 & (+s ^ o));)
s = +s << 1, --n;
s = "(" + n + " bit)\n"
}
a && (i -= 256);
for (var r = new v(i), c = e + 1; c < t; ++c)
r.mulAdd(256, this.get(c));
return s + r.toString()
},
e.prototype.parseBitString = function(e, t, n) {
for (var i = this.get(e), a = "(" + ((t - e - 1 << 3) - i) + " bit)\n", o = "", s = e + 1; s < t; ++s) {
for (var r = this.get(s), c = s == t - 1 ? i : 0, d = 7; c <= d; --d)
o += r >> d & 1 ? "1" : "0";
if (o.length > n) return a + E(o, n)
}
return a + o
},
e.prototype.parseOctetString = function(e, t, n) {
if (this.isASCII(e, t)) return E(this.parseStringISO(e, t), n);
var i = t - e,
a = "(" + i + " byte)\n";
(n /= 2) < i && (t = e + n);
for (var o = e; o < t; ++o)
a += this.hexByte(this.get(o));
return n < i && (a += y),
a
},
e.prototype.parseOID = function(e, t, n) {
for (var i = "", a = new v, o = 0, s = e; s < t; ++s) {
var r = this.get(s);
if (a.mulAdd(128, 127 & r),
o += 7, !(128 & r)) {
if ("" === i) if ((a = a.simplify()) instanceof v) a.sub(80),
i = "2." + a.toString();
else {
var c = a < 80 ? a < 40 ? 0 : 1 : 2;
i = c + "." + (a - 40 * c)
} else i += "." + a.toString();
if (i.length > n) return E(i, n);
a = new v,
o = 0
}
}
return 0 < o && (i += ".incomplete"),
i
},
e
}(),
T = function() {
function e(e, t, n, i, a) {
if (!(i instanceof k)) throw new Error("Invalid tag value.");
this.stream = e,
this.header = t,
this.length = n,
this.tag = i,
this.sub = a
}
return e.prototype.typeName = function() {
switch (this.tag.tagClass) {
case 0:
switch (this.tag.tagNumber) {
case 0:
return "EOC";
case 1:
return "BOOLEAN";
case 2:
return "INTEGER";
case 3:
return "BIT_STRING";
case 4:
return "OCTET_STRING";
case 5:
return "NULL";
case 6:
return "OBJECT_IDENTIFIER";
case 7:
return "ObjectDescriptor";
case 8:
return "EXTERNAL";
case 9:
return "REAL";
case 10:
return "ENUMERATED";
case 11:
return "EMBEDDED_PDV";
case 12:
return "UTF8String";
case 16:
return "SEQUENCE";
case 17:
return "SET";
case 18:
return "NumericString";
case 19:
return "PrintableString";
case 20:
return "TeletexString";
case 21:
return "VideotexString";
case 22:
return "IA5String";
case 23:
return "UTCTime";
case 24:
return "GeneralizedTime";
case 25:
return "GraphicString";
case 26:
return "VisibleString";
case 27:
return "GeneralString";
case 28:
return "UniversalString";
case 30:
return "BMPString"
}
return "Universal_" + this.tag.tagNumber.toString();
case 1:
return "Application_" + this.tag.tagNumber.toString();
case 2:
return "[" + this.tag.tagNumber.toString() + "]";
case 3:
return "Private_" + this.tag.tagNumber.toString()
}
},
e.prototype.content = function(e) {
if (void 0 === this.tag) return null;
void 0 === e && (e = 1 / 0);
var t = this.posContent(),
n = Math.abs(this.length);
if (!this.tag.isUniversal()) return null !== this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(t, t + n, e);
switch (this.tag.tagNumber) {
case 1:
return 0 === this.stream.get(t) ? "false" : "true";
case 2:
return this.stream.parseInteger(t, t + n);
case 3:
return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(t, t + n, e);
case 4:
return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(t, t + n, e);
case 6:
return this.stream.parseOID(t, t + n, e);
case 16:
case 17:
return null !== this.sub ? "(" + this.sub.length + " elem)" : "(no elem)";
case 12:
return E(this.stream.parseStringUTF(t, t + n), e);
case 18:
case 19:
case 20:
case 21:
case 22:
case 26:
return E(this.stream.parseStringISO(t, t + n), e);
case 30:
return E(this.stream.parseStringBMP(t, t + n), e);
case 23:
case 24:
return this.stream.parseTime(t, t + n, 23 == this.tag.tagNumber)
}
return null
},
e.prototype.toString = function() {
return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (null === this.sub ? "null" : this.sub.length) + "]"
},
e.prototype.toPrettyString = function(e) {
void 0 === e && (e = "");
var t = e + this.typeName() + " @" + this.stream.pos;
if (0 <= this.length && (t += "+"),
t += this.length,
this.tag.tagConstructed ? t += " (constructed)" : !this.tag.isUniversal() || 3 != this.tag.tagNumber && 4 != this.tag.tagNumber || null === this.sub || (t += " (encapsulates)"),
t += "\n",
null !== this.sub) {
e += " ";
for (var n = 0, i = this.sub.length; n < i; ++n)
t += this.sub[n].toPrettyString(e)
}
return t
},
e.prototype.posStart = function() {
return this.stream.pos
},
e.prototype.posContent = function() {
return this.stream.pos + this.header
},
e.prototype.posEnd = function() {
return this.stream.pos + this.header + Math.abs(this.length)
},
e.prototype.toHexString = function() {
return this.stream.hexDump(this.posStart(), this.posEnd(), !0)
},
e.decodeLength = function(e) {
var t = e.get(),
n = 127 & t;
if (n == t) return n;
if (6 < n) throw new Error("Length over 48 bits not supported at position " + (e.pos - 1));
if (0 === n) return null;
for (var i = t = 0; i < n; ++i)
t = 256 * t + e.get();
return t
},
e.prototype.getHexStringValue = function() {
var e = this.toHexString(),
t = 2 * this.header,
n = 2 * this.length;
return e.substr(t, n)
},
e.decode = function(t) {
var n;
n = t instanceof x ? t : new x(t, 0);
var i = new x(n),
a = new k(n),
o = e.decodeLength(n),
s = n.pos,
r = s - i.pos,
c = null,
d = function() {
var t = [];
if (null !== o) {
for (var i = s + o; n.pos < i;)
t[t.length] = e.decode(n);
if (n.pos != i) throw new Error("Content size is not correct for container starting at offset " + s)
} else try {
for (;;) {
var a = e.decode(n);
if (a.tag.isEOC()) break;
t[t.length] = a
}
o = s - n.pos
} catch (t) {乐易助手提示 ('这里返回假,请删除上面的 try/catch代码');
throw new Error("Exception while decoding undefined length content: " + t)
}
return t
};
if (a.tagConstructed) c = d();
else if (a.isUniversal() && (3 == a.tagNumber || 4 == a.tagNumber)) try {
if (3 == a.tagNumber && 0 != n.get()) throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
c = d();
for (var l = 0; l < c.length; ++l)
if (c[l].tag.isEOC()) throw new Error("EOC is not supposed to be actual content.")
} catch (t) {乐易助手提示 ('这里返回假,请删除上面的 try/catch代码');
c = null
}
if (null === c) {
if (null === o) throw new Error("We can't skip over an invalid tag with undefined length at offset " + s);
n.pos = s + Math.abs(o)
}
return new e(i, r, o, a, c)
},
e
}(),
k = function() {
function e(e) {
var t = e.get();
if (this.tagClass = t >> 6,
this.tagConstructed = 0 != (32 & t),
this.tagNumber = 31 & t,
31 == this.tagNumber) {
for (var n = new v; t = e.get(),
n.mulAdd(128, 127 & t),
128 & t;);
this.tagNumber = n.simplify()
}
}
return e.prototype.isUniversal = function() {
return 0 === this.tagClass
},
e.prototype.isEOC = function() {
return 0 === this.tagClass && 0 === this.tagNumber
},
e
}(),
L = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997],
_ = (1 << 26) / L[L.length - 1],
I = function() {
function e(e, t, n) {
null != e && ("number" == typeof e ? this.fromNumber(e, t, n) : null == t && "string" != typeof e ? this.fromString(e, 256) : this.fromString(e, t))
}
return e.prototype.toString = function(e) {
if (this.s < 0) return "-" + this.negate().toString(e);
var t;
if (16 == e) t = 4;
else if (8 == e) t = 3;
else if (2 == e) t = 1;
else if (32 == e) t = 5;
else {
if (4 != e) return this.toRadix(e);
t = 2
}
var i, a = (1 << t) - 1,
o = !1,
s = "",
r = this.t,
c = this.DB - r * this.DB % t;
if (0 < r--) for (c < this.DB && 0 < (i = this[r] >> c) && (o = !0,
s = n(i)); 0 <= r;)
c < t ? (i = (this[r] & (1 << c) - 1) << t - c,
i |= this[--r] >> (c += this.DB - t)) : (i = this[r] >> (c -= t) & a,
c <= 0 && (c += this.DB, --r)),
0 < i && (o = !0),
o && (s += n(i));
return o ? s : "0"
},
e.prototype.negate = function() {
var t = M();
return e.ZERO.subTo(this, t),
t
},
e.prototype.abs = function() {
return this.s < 0 ? this.negate() : this
},
e.prototype.compareTo = function(e) {
var t = this.s - e.s;
if (0 != t) return t;
var n = this.t;
if (0 != (t = n - e.t)) return this.s < 0 ? -t : t;
for (; 0 <= --n;)
if (0 != (t = this[n] - e[n])) return t;
return 0
},
e.prototype.bitLength = function() {
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + G(this[this.t - 1] ^ this.s & this.DM)
},
e.prototype.mod = function(t) {
var n = M();
return this.abs().divRemTo(t, null, n),
this.s < 0 && 0 < n.compareTo(e.ZERO) && t.subTo(n, n),
n
},
e.prototype.modPowInt = function(e, t) {
var n;
return n = e < 256 || t.isEven() ? new A(t) : new P(t),
this.exp(e, n)
},
e.prototype.clone = function() {
var e = M();
return this.copyTo(e),
e
},
e.prototype.intValue = function() {
if (this.s < 0) {
if (1 == this.t) return this[0] - this.DV;
if (0 == this.t) return -1
} else {
if (1 == this.t) return this[0];
if (0 == this.t) return 0
}
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]
},
e.prototype.byteValue = function() {
return 0 == this.t ? this.s : this[0] << 24 >> 24
},
e.prototype.shortValue = function() {
return 0 == this.t ? this.s : this[0] << 16 >> 16
},
e.prototype.signum = function() {
return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1
},
e.prototype.toByteArray = function() {
var e = this.t,
t = [];
t[0] = this.s;
var n, i = this.DB - e * this.DB % 8,
a = 0;
if (0 < e--) for (i < this.DB && (n = this[e] >> i) != (this.s & this.DM) >> i && (t[a++] = n | this.s << this.DB - i); 0 <= e;)
i < 8 ? (n = (this[e] & (1 << i) - 1) << 8 - i,
n |= this[--e] >> (i += this.DB - 8)) : (n = this[e] >> (i -= 8) & 255,
i <= 0 && (i += this.DB, --e)),
0 != (128 & n) && (n |= -256),
0 == a && (128 & this.s) != (128 & n) && ++a, (0 < a || n != this.s) && (t[a++] = n);
return t
},
e.prototype.equals = function(e) {
return 0 == this.compareTo(e)
},
e.prototype.min = function(e) {
return this.compareTo(e) < 0 ? this : e
},
e.prototype.max = function(e) {
return 0 < this.compareTo(e) ? this : e
},
e.prototype.and = function(e) {
var t = M();
return this.bitwiseTo(e, i, t),
t
},
e.prototype.or = function(e) {
var t = M();
return this.bitwiseTo(e, a, t),
t
},
e.prototype.xor = function(e) {
var t = M();
return this.bitwiseTo(e, o, t),
t
},
e.prototype.andNot = function(e) {
var t = M();
return this.bitwiseTo(e, s, t),
t
},
e.prototype.not = function() {
for (var e = M(), t = 0; t < this.t; ++t)
e[t] = this.DM & ~this[t];
return e.t = this.t,
e.s = ~this.s,
e
},
e.prototype.shiftLeft = function(e) {
var t = M();
return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t),
t
},
e.prototype.shiftRight = function(e) {
var t = M();
return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t),
t
},
e.prototype.getLowestSetBit = function() {
for (var e = 0; e < this.t; ++e)
if (0 != this[e]) return e * this.DB + r(this[e]);
return this.s < 0 ? this.t * this.DB : -1
},
e.prototype.bitCount = function() {
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n)
e += c(this[n] ^ t);
return e
},
e.prototype.testBit = function(e) {
var t = Math.floor(e / this.DB);
return t >= this.t ? 0 != this.s : 0 != (this[t] & 1 << e % this.DB)
},
e.prototype.setBit = function(e) {
return this.changeBit(e, a)
},
e.prototype.clearBit = function(e) {
return this.changeBit(e, s)
},
e.prototype.flipBit = function(e) {
return this.changeBit(e, o)
},
e.prototype.add = function(e) {
var t = M();
return this.addTo(e, t),
t
},
e.prototype.subtract = function(e) {
var t = M();
return this.subTo(e, t),
t
},
e.prototype.multiply = function(e) {
var t = M();
return this.multiplyTo(e, t),
t
},
e.prototype.divide = function(e) {
var t = M();
return this.divRemTo(e, t, null),
t
},
e.prototype.remainder = function(e) {
var t = M();
return this.divRemTo(e, null, t),
t
},
e.prototype.divideAndRemainder = function(e) {
var t = M(),
n = M();
return this.divRemTo(e, t, n), [t, n]
},
e.prototype.modPow = function(e, t) {
var n, i, a = e.bitLength(),
o = V(1);
if (a <= 0) return o;
n = a < 18 ? 1 : a < 48 ? 3 : a < 144 ? 4 : a < 768 ? 5 : 6,
i = a < 8 ? new A(t) : t.isEven() ? new N(t) : new P(t);
var s = [],
r = 3,
c = n - 1,
d = (1 << n) - 1;
if (s[1] = i.convert(this),
1 < n) {
var l = M();
for (i.sqrTo(s[1], l); r <= d;)
s[r] = M(),
i.mulTo(l, s[r - 2], s[r]),
r += 2
}
var u, h, p = e.t - 1,
m = !0,
f = M();
for (a = G(e[p]) - 1; 0 <= p;) {
for (c <= a ? u = e[p] >> a - c & d : (u = (e[p] & (1 << a + 1) - 1) << c - a,
0 < p && (u |= e[p - 1] >> this.DB + a - c)),
r = n; 0 == (1 & u);)
u >>= 1, --r;
if ((a -= r) < 0 && (a += this.DB, --p),
m) s.copyTo(o),
m = !1;
else {
for (; 1 < r;)
i.sqrTo(o, f),
i.sqrTo(f, o),
r -= 2;
0 < r ? i.sqrTo(o, f) : (h = o,
o = f,
f = h),
i.mulTo(f, s, o)
}
for (; 0 <= p && 0 == (e[p] & 1 << a);)
i.sqrTo(o, f),
h = o,
o = f,
f = h, --a < 0 && (a = this.DB - 1, --p)
}
return i.revert(o)
},
e.prototype.modInverse = function(t) {
var n = t.isEven();
if (this.isEven() && n || 0 == t.signum()) return e.ZERO;
for (var i = t.clone(), a = this.clone(), o = V(1), s = V(0), r = V(0), c = V(1); 0 != i.signum();) {
for (; i.isEven();)
i.rShiftTo(1, i),
n ? (o.isEven() && s.isEven() || (o.addTo(this, o),
s.subTo(t, s)),
o.rShiftTo(1, o)) : s.isEven() || s.subTo(t, s),
s.rShiftTo(1, s);
for (; a.isEven();)
a.rShiftTo(1, a),
n ? (r.isEven() && c.isEven() || (r.addTo(this, r),
c.subTo(t, c)),
r.rShiftTo(1, r)) : c.isEven() || c.subTo(t, c),
c.rShiftTo(1, c);
0 <= i.compareTo(a) ? (i.subTo(a, i),
n && o.subTo(r, o),
s.subTo(c, s)) : (a.subTo(i, a),
n && r.subTo(o, r),
c.subTo(s, c))
}
return 0 != a.compareTo(e.ONE) ? e.ZERO : 0 <= c.compareTo(t) ? c.subtract(t) : c.signum() < 0 ? (c.addTo(t, c),
c.signum() < 0 ? c.add(t) : c) : c
},
e.prototype.pow = function(e) {
return this.exp(e, new D)
},
e.prototype.gcd = function(e) {
var t = this.s < 0 ? this.negate() : this.clone(),
n = e.s < 0 ? e.negate() : e.clone();
if (t.compareTo(n) < 0) {
var i = t;
t = n,
n = i
}
var a = t.getLowestSetBit(),
o = n.getLowestSetBit();
if (o < 0) return t;
for (a < o && (o = a),
0 < o && (t.rShiftTo(o, t),
n.rShiftTo(o, n)); 0 < t.signum();)
0 < (a = t.getLowestSetBit()) && t.rShiftTo(a, t),
0 < (a = n.getLowestSetBit()) && n.rShiftTo(a, n),
0 <= t.compareTo(n) ? (t.subTo(n, t),
t.rShiftTo(1, t)) : (n.subTo(t, n),
n.rShiftTo(1, n));
return 0 < o && n.lShiftTo(o, n),
n
},
e.prototype.isProbablePrime = function(e) {
var t, n = this.abs();
if (1 == n.t && n[0] <= L[L.length - 1]) {
for (t = 0; t < L.length; ++t)
if (n[0] == L[t]) return !0;
return !1
}
if (n.isEven()) return !1;
for (t = 1; t < L.length;) {
for (var i = L[t], a = t + 1; a < L.length && i < _;)
i *= L[a++];
for (i = n.modInt(i); t < a;)
if (i % L[t++] == 0) return !1
}
return n.millerRabin(e)
},
e.prototype.copyTo = function(e) {
for (var t = this.t - 1; 0 <= t; --t)
e[t] = this[t];
e.t = this.t,
e.s = this.s
},
e.prototype.fromInt = function(e) {
this.t = 1,
this.s = e < 0 ? -1 : 0,
0 < e ? this[0] = e : e < -1 ? this[0] = e + this.DV : this.t = 0
},
e.prototype.fromString = function(t, n) {
var i;
if (16 == n) i = 4;
else if (8 == n) i = 3;
else if (256 == n) i = 8;
else if (2 == n) i = 1;
else if (32 == n) i = 5;
else {
if (4 != n) return void this.fromRadix(t, n);
i = 2
}
this.t = 0,
this.s = 0;
for (var a = t.length, o = !1, s = 0; 0 <= --a;) {
var r = 8 == i ? 255 & +t[a] : H(t, a);
r < 0 ? "-" == t.charAt(a) && (o = !0) : (o = !1,
0 == s ? this[this.t++] = r : s + i > this.DB ? (this[this.t - 1] |= (r & (1 << this.DB - s) - 1) << s,
this[this.t++] = r >> this.DB - s) : this[this.t - 1] |= r << s, (s += i) >= this.DB && (s -= this.DB))
}
8 == i && 0 != (128 & +t[0]) && (this.s = -1,
0 < s && (this[this.t - 1] |= (1 << this.DB - s) - 1 << s)),
this.clamp(),
o && e.ZERO.subTo(this, this)
},
e.prototype.clamp = function() {
for (var e = this.s & this.DM; 0 < this.t && this[this.t - 1] == e;)--this.t
},
e.prototype.dlShiftTo = function(e, t) {
var n;
for (n = this.t - 1; 0 <= n; --n)
t[n + e] = this[n];
for (n = e - 1; 0 <= n; --n)
t[n] = 0;
t.t = this.t + e,
t.s = this.s
},
e.prototype.drShiftTo = function(e, t) {
for (var n = e; n < this.t; ++n)
t[n - e] = this[n];
t.t = Math.max(this.t - e, 0),
t.s = this.s
},
e.prototype.lShiftTo = function(e, t) {
for (var n = e % this.DB, i = this.DB - n, a = (1 << i) - 1, o = Math.floor(e / this.DB), s = this.s << n & this.DM, r = this.t - 1; 0 <= r; --r)
t[r + o + 1] = this[r] >> i | s,
s = (this[r] & a) << n;
for (r = o - 1; 0 <= r; --r)
t[r] = 0;
t[o] = s,
t.t = this.t + o + 1,
t.s = this.s,
t.clamp()
},
e.prototype.rShiftTo = function(e, t) {
t.s = this.s;
var n = Math.floor(e / this.DB);
if (n >= this.t) t.t = 0;
else {
var i = e % this.DB,
a = this.DB - i,
o = (1 << i) - 1;
t[0] = this[n] >> i;
for (var s = n + 1; s < this.t; ++s)
t[s - n - 1] |= (this & o) << a,
t[s - n] = this >> i;
0 < i && (t[this.t - n - 1] |= (this.s & o) << a),
t.t = this.t - n,
t.clamp()
}
},
e.prototype.subTo = function(e, t) {
for (var n = 0, i = 0, a = Math.min(e.t, this.t); n < a;)
i += this[n] - e[n],
t[n++] = i & this.DM,
i >>= this.DB;
if (e.t < this.t) {
for (i -= e.s; n < this.t;)
i += this[n],
t[n++] = i & this.DM,
i >>= this.DB;
i += this.s
} else {
for (i += this.s; n < e.t;)
i -= e[n],
t[n++] = i & this.DM,
i >>= this.DB;
i -= e.s
}
t.s = i < 0 ? -1 : 0,
i < -1 ? t[n++] = this.DV + i : 0 < i && (t[n++] = i),
t.t = n,
t.clamp()
},
e.prototype.multiplyTo = function(t, n) {
var i = this.abs(),
a = t.abs(),
o = i.t;
for (n.t = o + a.t; 0 <= --o;)
n[o] = 0;
for (o = 0; o < a.t; ++o)
n[o + i.t] = i.am(0, a[o], n, o, 0, i.t);
n.s = 0,
n.clamp(),
this.s != t.s && e.ZERO.subTo(n, n)
},
e.prototype.squareTo = function(e) {
for (var t = this.abs(), n = e.t = 2 * t.t; 0 <= --n;)
e[n] = 0;
for (n = 0; n < t.t - 1; ++n) {
var i = t.am(n, t[n], e, 2 * n, 0, 1);
(e[n + t.t] += t.am(n + 1, 2 * t[n], e, 2 * n + 1, i, t.t - n - 1)) >= t.DV && (e[n + t.t] -= t.DV,
e[n + t.t + 1] = 1)
}
0 < e.t && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)),
e.s = 0,
e.clamp()
},
e.prototype.divRemTo = function(t, n, i) {
var a = t.abs();
if (!(a.t <= 0)) {
var o = this.abs();
if (o.t < a.t) return null != n && n.fromInt(0),
void(null != i && this.copyTo(i));
null == i && (i = M());
var s = M(),
r = this.s,
c = t.s,
d = this.DB - G(a[a.t - 1]);
0 < d ? (a.lShiftTo(d, s),
o.lShiftTo(d, i)) : (a.copyTo(s),
o.copyTo(i));
var l = s.t,
u = s[l - 1];
if (0 != u) {
var h = u * (1 << this.F1) + (1 < l ? s[l - 2] >> this.F2 : 0),
p = this.FV / h,
m = (1 << this.F1) / h,
f = 1 << this.F2,
g = i.t,
C = g - l,
v = null == n ? M() : n;
for (s.dlShiftTo(C, v),
0 <= i.compareTo(v) && (i[i.t++] = 1,
i.subTo(v, i)),
e.ONE.dlShiftTo(l, v),
v.subTo(s, s); s.t < l;)
s[s.t++] = 0;
for (; 0 <= --C;) {
var y = i[--g] == u ? this.DM : Math.floor(i[g] * p + (i[g - 1] + f) * m);
if ((i[g] += s.am(0, y, i, C, 0, l)) < y) for (s.dlShiftTo(C, v),
i.subTo(v, i); i[g] < --y;)
i.subTo(v, i)
}
null != n && (i.drShiftTo(l, n),
r != c && e.ZERO.subTo(n, n)),
i.t = l,
i.clamp(),
0 < d && i.rShiftTo(d, i),
r < 0 && e.ZERO.subTo(i, i)
}
}
},
e.prototype.invDigit = function() {
if (this.t < 1) return 0;
var e = this[0];
if (0 == (1 & e)) return 0;
var t = 3 & e;
return 0 < (t = (t = (t = (t = t * (2 - (15 & e) * t) & 15) * (2 - (255 & e) * t) & 255) * (2 - ((65535 & e) * t & 65535)) & 65535) * (2 - e * t % this.DV) % this.DV) ? this.DV - t : -t
},
e.prototype.isEven = function() {
return 0 == (0 < this.t ? 1 & this[0] : this.s)
},
e.prototype.exp = function(t, n) {
if (4294967295 < t || t < 1) return e.ONE;
var i = M(),
a = M(),
o = n.convert(this),
s = G(t) - 1;
for (o.copyTo(i); 0 <= --s;)
if (n.sqrTo(i, a),
0 < (t & 1 << s)) n.mulTo(a, o, i);
else {
var r = i;
i = a,
a = r
}
return n.revert(i)
},
e.prototype.chunkSize = function(e) {
return Math.floor(Math.LN2 * this.DB / Math.log(e))
},
e.prototype.toRadix = function(e) {
if (null == e && (e = 10),
0 == this.signum() || e < 2 || 36 < e) return "0";
var t = this.chunkSize(e),
n = Math.pow(e, t),
i = V(n),
a = M(),
o = M(),
s = "";
for (this.divRemTo(i, a, o); 0 < a.signum();)
s = (n + o.intValue()).toString(e).substr(1) + s,
a.divRemTo(i, a, o);
return o.intValue().toString(e) + s
},
e.prototype.fromRadix = function(t, n) {
this.fromInt(0),
null == n && (n = 10);
for (var i = this.chunkSize(n), a = Math.pow(n, i), o = !1, s = 0, r = 0, c = 0; c < t.length; ++c) {
var d = H(t, c);
d < 0 ? "-" == t.charAt(c) && 0 == this.signum() && (o = !0) : (r = n * r + d, ++s >= i && (this.dMultiply(a),
this.dAddOffset(r, 0),
r = s = 0))
}
0 < s && (this.dMultiply(Math.pow(n, s)),
this.dAddOffset(r, 0)),
o && e.ZERO.subTo(this, this)
},
e.prototype.fromNumber = function(t, n, i) {
if ("number" == typeof n) if (t < 2) this.fromInt(1);
else for (this.fromNumber(t, i),
this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), a, this),
this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(n);)
this.dAddOffset(2, 0),
this.bitLength() > t && this.subTo(e.ONE.shiftLeft(t - 1), this);
else {
var o = [],
s = 7 & t;
o.length = 1 + (t >> 3),
n.nextBytes(o),
0 < s ? o[0] &= (1 << s) - 1 : o[0] = 0,
this.fromString(o, 256)
}
},
e.prototype.bitwiseTo = function(e, t, n) {
var i, a, o = Math.min(e.t, this.t);
for (i = 0; i < o; ++i)
n = t(this, e);
if (e.t < this.t) {
for (a = e.s & this.DM,
i = o; i < this.t; ++i)
n = t(this, a);
n.t = this.t
} else {
for (a = this.s & this.DM,
i = o; i < e.t; ++i)
n = t(a, e);
n.t = e.t
}
n.s = t(this.s, e.s),
n.clamp()
},
e.prototype.changeBit = function(t, n) {
var i = e.ONE.shiftLeft(t);
return this.bitwiseTo(i, n, i),
i
},
e.prototype.addTo = function(e, t) {
for (var n = 0, i = 0, a = Math.min(e.t, this.t); n < a;)
i += this[n] + e[n],
t[n++] = i & this.DM,
i >>= this.DB;
if (e.t < this.t) {
for (i += e.s; n < this.t;)
i += this[n],
t[n++] = i & this.DM,
i >>= this.DB;
i += this.s
} else {
for (i += this.s; n < e.t;)
i += e[n],
t[n++] = i & this.DM,
i >>= this.DB;
i += e.s
}
t.s = i < 0 ? -1 : 0,
0 < i ? t[n++] = i : i < -1 && (t[n++] = this.DV + i),
t.t = n,
t.clamp()
},
e.prototype.dMultiply = function(e) {
this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t,
this.clamp()
},
e.prototype.dAddOffset = function(e, t) {
if (0 != e) {
for (; this.t <= t;)
this[this.t++] = 0;
for (this[t] += e; this[t] >= this.DV;)
this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t]
}
},
e.prototype.multiplyLowerTo = function(e, t, n) {
var i = Math.min(this.t + e.t, t);
for (n.s = 0,
n.t = i; 0 < i;)
n[--i] = 0;
for (var a = n.t - this.t; i < a; ++i)
n[i + this.t] = this.am(0, e, n, i, 0, this.t);
for (a = Math.min(e.t, t); i < a; ++i)
this.am(0, e, n, i, 0, t - i);
n.clamp()
},
e.prototype.multiplyUpperTo = function(e, t, n) {
--t;
var i = n.t = this.t + e.t - t;
for (n.s = 0; 0 <= --i;)
n = 0;
for (i = Math.max(t - this.t, 0); i < e.t; ++i)
n[this.t + i - t] = this.am(t - i, e, n, 0, 0, this.t + i - t);
n.clamp(),
n.drShiftTo(1, n)
},
e.prototype.modInt = function(e) {
if (e <= 0) return 0;
var t = this.DV % e,
n = this.s < 0 ? e - 1 : 0;
if (0 < this.t) if (0 == t) n = this[0] % e;
else for (var i = this.t - 1; 0 <= i; --i)
n = (t * n + this) % e;
return n
},
e.prototype.millerRabin = function(t) {
var n = this.subtract(e.ONE),
i = n.getLowestSetBit();
if (i <= 0) return !1;
var a = n.shiftRight(i);
L.length < (t = t + 1 >> 1) && (t = L.length);
for (var o = M(), s = 0; s < t; ++s) {
o.fromInt(L[Math.floor(Math.random() * L.length)]);
var r = o.modPow(a, this);
if (0 != r.compareTo(e.ONE) && 0 != r.compareTo(n)) {
for (var c = 1; c++ < i && 0 != r.compareTo(n);)
if (0 == (r = r.modPowInt(2, this)).compareTo(e.ONE)) return !1;
if (0 != r.compareTo(n)) return !1
}
}
return !0
},
e.prototype.square = function() {
var e = M();
return this.squareTo(e),
e
},
e.prototype.gcda = function(e, t) {
var n = this.s < 0 ? this.negate() : this.clone(),
i = e.s < 0 ? e.negate() : e.clone();
if (n.compareTo(i) < 0) {
var a = n;
n = i,
i = a
}
var o = n.getLowestSetBit(),
s = i.getLowestSetBit();
if (s < 0) t(n);
else {
o < s && (s = o),
0 < s && (n.rShiftTo(s, n),
i.rShiftTo(s, i));
var r = function() {
0 < (o = n.getLowestSetBit()) && n.rShiftTo(o, n),
0 < (o = i.getLowestSetBit()) && i.rShiftTo(o, i),
0 <= n.compareTo(i) ? (n.subTo(i, n),
n.rShiftTo(1, n)) : (i.subTo(n, i),
i.rShiftTo(1, i)),
0 < n.signum() ? setTimeout(r, 0) : (0 < s && i.lShiftTo(s, i),
setTimeout((function() {
t(i)
}), 0))
};
setTimeout(r, 10)
}
},
e.prototype.fromNumberAsync = function(t, n, i, o) {
if ("number" == typeof n) if (t < 2) this.fromInt(1);
else {
this.fromNumber(t, i),
this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), a, this),
this.isEven() && this.dAddOffset(1, 0);
var s = this,
r = function() {
s.dAddOffset(2, 0),
s.bitLength() > t && s.subTo(e.ONE.shiftLeft(t - 1), s),
s.isProbablePrime(n) ? setTimeout((function() {
o()
}), 0) : setTimeout(r, 0)
};
setTimeout(r, 0)
} else {
var c = [],
d = 7 & t;
c.length = 1 + (t >> 3),
n.nextBytes(c),
0 < d ? c[0] &= (1 << d) - 1 : c[0] = 0,
this.fromString(c, 256)
}
},
e
}(),
D = function() {
function e() {}
return e.prototype.convert = function(e) {
return e
},
e.prototype.revert = function(e) {
return e
},
e.prototype.mulTo = function(e, t, n) {
e.multiplyTo(t, n)
},
e.prototype.sqrTo = function(e, t) {
e.squareTo(t)
},
e
}(),
A = function() {
function e(e) {
this.m = e
}
return e.prototype.convert = function(e) {
return e.s < 0 || 0 <= e.compareTo(this.m) ? e.mod(this.m) : e
},
e.prototype.revert = function(e) {
return e
},
e.prototype.reduce = function(e) {
e.divRemTo(this.m, null, e)
},
e.prototype.mulTo = function(e, t, n) {
e.multiplyTo(t, n),
this.reduce(n)
},
e.prototype.sqrTo = function(e, t) {
e.squareTo(t),
this.reduce(t)
},
e
}(),
P = function() {
function e(e) {
this.m = e,
this.mp = e.invDigit(),
this.mpl = 32767 & this.mp,
this.mph = this.mp >> 15,
this.um = (1 << e.DB - 15) - 1,
this.mt2 = 2 * e.t
}
return e.prototype.convert = function(e) {
var t = M();
return e.abs().dlShiftTo(this.m.t, t),
t.divRemTo(this.m, null, t),
e.s < 0 && 0 < t.compareTo(I.ZERO) && this.m.subTo(t, t),
t
},
e.prototype.revert = function(e) {
var t = M();
return e.copyTo(t),
this.reduce(t),
t
},
e.prototype.reduce = function(e) {
for (; e.t <= this.mt2;)
e[e.t++] = 0;
for (var t = 0; t < this.m.t; ++t) {
var n = 32767 & e[t],
i = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
for (e[n = t + this.m.t] += this.m.am(0, i, e, t, 0, this.m.t); e[n] >= e.DV;)
e[n] -= e.DV,
e[++n]++
}
e.clamp(),
e.drShiftTo(this.m.t, e),
0 <= e.compareTo(this.m) && e.subTo(this.m, e)
},
e.prototype.mulTo = function(e, t, n) {
e.multiplyTo(t, n),
this.reduce(n)
},
e.prototype.sqrTo = function(e, t) {
e.squareTo(t),
this.reduce(t)
},
e
}(),
N = function() {
function e(e) {
this.m = e,
this.r2 = M(),
this.q3 = M(),
I.ONE.dlShiftTo(2 * e.t, this.r2),
this.mu = this.r2.divide(e)
}
return e.prototype.convert = function(e) {
if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
if (e.compareTo(this.m) < 0) return e;
var t = M();
return e.copyTo(t),
this.reduce(t),
t
},
e.prototype.revert = function(e) {
return e
},
e.prototype.reduce = function(e) {
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);
for (e.subTo(this.r2, e); 0 <= e.compareTo(this.m);)
e.subTo(this.m, e)
},
e.prototype.mulTo = function(e, t, n) {
e.multiplyTo(t, n),
this.reduce(n)
},
e.prototype.sqrTo = function(e, t) {
e.squareTo(t),
this.reduce(t)
},
e
}();
function M() {
return new I(null)
}
function F(e, t) {
return new I(e, t)
}
"Microsoft Internet Explorer" == navigator.appName ? (I.prototype.am = function(e, t, n, i, a, o) {
for (var s = 32767 & t, r = t >> 15; 0 <= --o;) {
var c = 32767 & this[e],
d = this[e++] >> 15,
l = r * c + d * s;
a = ((c = s * c + ((32767 & l) << 15) + n + (1073741823 & a)) >>> 30) + (l >>> 15) + r * d + (a >>> 30),
n[i++] = 1073741823 & c
}
return a
},
S = 30) : "Netscape" != navigator.appName ? (I.prototype.am = function(e, t, n, i, a, o) {
for (; 0 <= --o;) {
var s = t * this[e++] + n + a;
a = Math.floor(s / 67108864),
n[i++] = 67108863 & s
}
return a
},
S = 26) : (I.prototype.am = function(e, t, n, i, a, o) {
for (var s = 16383 & t, r = t >> 14; 0 <= --o;) {
var c = 16383 & this[e],
d = this[e++] >> 14,
l = r * c + d * s;
a = ((c = s * c + ((16383 & l) << 14) + n + a) >> 28) + (l >> 14) + r * d,
n[i++] = 268435455 & c
}
return a
},
S = 28),
I.prototype.DB = S,
I.prototype.DM = (1 << S) - 1,
I.prototype.DV = 1 << S,
I.prototype.FV = Math.pow(2, 52),
I.prototype.F1 = 52 - S,
I.prototype.F2 = 2 * S - 52;
var B, O, R = [];
for (B = "0".charCodeAt(0),
O = 0; O <= 9; ++O)
R[B++] = O;
for (B = "a".charCodeAt(0),
O = 10; O < 36; ++O)
R[B++] = O;
for (B = "A".charCodeAt(0),
O = 10; O < 36; ++O)
R[B++] = O;
function H(e, t) {
var n = R[e.charCodeAt(t)];
return null == n ? -1 : n
}
function V(e) {
var t = M();
return t.fromInt(e),
t
}
function G(e) {
var t, n = 1;
return 0 != (t = e >>> 16) && (e = t,
n += 16),
0 != (t = e >> 8) && (e = t,
n += 8),
0 != (t = e >> 4) && (e = t,
n += 4),
0 != (t = e >> 2) && (e = t,
n += 2),
0 != (t = e >> 1) && (e = t,
n += 1),
n
}
I.ZERO = V(0),
I.ONE = V(1);
var j, U, $ = function() {
function e() {
this.i = 0,
this.j = 0,
this.S = []
}
return e.prototype.init = function(e) {
var t, n, i;
for (t = 0; t < 256; ++t)
this.S[t] = t;
for (t = n = 0; t < 256; ++t)
n = n + this.S[t] + e[t % e.length] & 255,
i = this.S[t],
this.S[t] = this.S[n],
this.S[n] = i;
this.i = 0,
this.j = 0
},
e.prototype.next = function() {
var e;
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]
},
e
}(),
Z = 256,
W = null;
if (null == W) {
W = [];
var q = void(U = 0);
if (window.crypto && window.crypto.getRandomValues) {
var Y = new Uint32Array(256);
for (window.crypto.getRandomValues(Y),
q = 0; q < Y.length; ++q)
W[U++] = 255 & Y[q]
}
var z = function(e) {
if (this.count = this.count || 0,
256 <= this.count || Z <= U) window.removeEventListener ? window.removeEventListener("mousemove", z, !1) : window.detachEvent && window.detachEvent("onmousemove", z);
else try {
var t = e.x + e.y;
W[U++] = 255 & t,
this.count += 1
} catch (t) {乐易助手提示 ('这里返回假,请删除上面的 try/catch代码');
}
};
window.addEventListener ? window.addEventListener("mousemove", z, !1) : window.attachEvent && window.attachEvent("onmousemove", z)
}
function K() {
if (null == j) {
for (j = new $; U < Z;) {
var e = Math.floor(65536 * Math.random());
W[U++] = 255 & e
}
for (j.init(W),
U = 0; U < W.length; ++U)
W[U] = 0;
U = 0
}
return j.next()
}
var J = function() {
function e() {}
return e.prototype.nextBytes = function(e) {
for (var t = 0; t < e.length; ++t)
e[t] = K()
},
e
}(),
Q = function() {
function e() {
this.n = null,
this.e = 0,
this.d = null,
this.p = null,
this.q = null,
this.dmp1 = null,
this.dmq1 = null,
this.coeff = null
}
return e.prototype.doPublic = function(e) {
return e.modPowInt(this.e, this.n)
},
e.prototype.doPrivate = function(e) {
if (null == this.p || null == this.q) return e.modPow(this.d, this.n);
for (var t = e.mod(this.p).modPow(this.dmp1, this.p), n = e.mod(this.q).modPow(this.dmq1, this.q); t.compareTo(n) < 0;)
t = t.add(this.p);
return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)
},
e.prototype.setPublic = function(e, t) {
null != e && null != t && 0 < e.length && 0 < t.length && (this.n = F(e, 16),
this.e = parseInt(t, 16))
},
e.prototype.encrypt = function(e) {
var t = function(e, t) {
if (t < e.length + 11) return null;
for (var n = [], i = e.length - 1; 0 <= i && 0 < t;) {
var a = e.charCodeAt(i--);
a < 128 ? n[--t] = a : 127 < a && a < 2048 ? (n[--t] = 63 & a | 128,
n[--t] = a >> 6 | 192) : (n[--t] = 63 & a | 128,
n[--t] = a >> 6 & 63 | 128,
n[--t] = a >> 12 | 224)
}
n[--t] = 0;
for (var o = new J, s = []; 2 < t;) {
for (s[0] = 0; 0 == s[0];)
o.nextBytes(s);
n[--t] = s[0]
}
return n[--t] = 2,
n[--t] = 0,
new I(n)
}(e, this.n.bitLength() + 7 >> 3);
if (null == t) return null;
var n = this.doPublic(t);
if (null == n) return null;
var i = n.toString(16);
return 0 == (1 & i.length) ? i : "0" + i
},
e.prototype.setPrivate = function(e, t, n) {
null != e && null != t && 0 < e.length && 0 < t.length && (this.n = F(e, 16),
this.e = parseInt(t, 16),
this.d = F(n, 16))
},
e.prototype.setPrivateEx = function(e, t, n, i, a, o, s, r) {
null != e && null != t && 0 < e.length && 0 < t.length && (this.n = F(e, 16),
this.e = parseInt(t, 16),
this.d = F(n, 16),
this.p = F(i, 16),
this.q = F(a, 16),
this.dmp1 = F(o, 16),
this.dmq1 = F(s, 16),
this.coeff = F(r, 16))
},
e.prototype.generate = function(e, t) {
var n = new J,
i = e >> 1;
this.e = parseInt(t, 16);
for (var a = new I(t, 16);;) {
for (; this.p = new I(e - i, 1, n),
0 != this.p.subtract(I.ONE).gcd(a).compareTo(I.ONE) || !this.p.isProbablePrime(10););
for (; this.q = new I(i, 1, n),
0 != this.q.subtract(I.ONE).gcd(a).compareTo(I.ONE) || !this.q.isProbablePrime(10););
if (this.p.compareTo(this.q) <= 0) {
var o = this.p;
this.p = this.q,
this.q = o
}
var s = this.p.subtract(I.ONE),
r = this.q.subtract(I.ONE),
c = s.multiply(r);
if (0 == c.gcd(a).compareTo(I.ONE)) {
this.n = this.p.multiply(this.q),
this.d = a.modInverse(c),
this.dmp1 = this.d.mod(s),
this.dmq1 = this.d.mod(r),
this.coeff = this.q.modInverse(this.p);
break
}
}
},
e.prototype.decrypt = function(e) {
var t = F(e, 16),
n = this.doPrivate(t);
return null == n ? null : function(e, t) {
for (var n = e.toByteArray(), i = 0; i < n.length && 0 == n;)++i;
if (n.length - i != t - 1 || 2 != n) return null;
for (++i; 0 != n;)
if (++i >= n.length) return null;
for (var a = ""; ++i < n.length;) {
var o = 255 & n;
o < 128 ? a += String.fromCharCode(o) : 191 < o && o < 224 ? (a += String.fromCharCode((31 & o) << 6 | 63 & n[i + 1]), ++i) : (a += String.fromCharCode((15 & o) << 12 | (63 & n[i + 1]) << 6 | 63 & n[i + 2]),
i += 2)
}
return a
}(n, this.n.bitLength() + 7 >> 3)
},
e.prototype.generateAsync = function(e, t, n) {
var i = new J,
a = e >> 1;
this.e = parseInt(t, 16);
var o = new I(t, 16),
s = this,
r = function() {
var t = function() {
if (s.p.compareTo(s.q) <= 0) {
var e = s.p;
s.p = s.q,
s.q = e
}
var t = s.p.subtract(I.ONE),
i = s.q.subtract(I.ONE),
a = t.multiply(i);
0 == a.gcd(o).compareTo(I.ONE) ? (s.n = s.p.multiply(s.q),
s.d = o.modInverse(a),
s.dmp1 = s.d.mod(t),
s.dmq1 = s.d.mod(i),
s.coeff = s.q.modInverse(s.p),
setTimeout((function() {
n()
}), 0)) : setTimeout(r, 0)
}, c = function() {
s.q = M(),
s.q.fromNumberAsync(a, 1, i, (function() {
s.q.subtract(I.ONE).gcda(o, (function(e) {
0 == e.compareTo(I.ONE) && s.q.isProbablePrime(10) ? setTimeout(t, 0) : setTimeout(c, 0)
}))
}))
}, d = function() {
s.p = M(),
s.p.fromNumberAsync(e - a, 1, i, (function() {
s.p.subtract(I.ONE).gcda(o, (function(e) {
0 == e.compareTo(I.ONE) && s.p.isProbablePrime(10) ? setTimeout(c, 0) : setTimeout(d, 0)
}))
}))
};
setTimeout(d, 0)
};
setTimeout(r, 0)
},
e.prototype.sign = function(e, t, n) {
var i = function(e, t) {
if (t < e.length + 22) return null;
for (var n = t - e.length - 6, i = "", a = 0; a < n; a += 2)
i += "ff";
return F("0001" + i + "00" + e, 16)
}((X[n] || "") + t(e).toString(), this.n.bitLength() / 4);
if (null == i) return null;
var a = this.doPrivate(i);
if (null == a) return null;
var o = a.toString(16);
return 0 == (1 & o.length) ? o : "0" + o
},
e.prototype.verify = function(e, t, n) {
var i = F(t, 16),
a = this.doPublic(i);
return null == a ? null : function(e) {
for (var t in X)
if (X.hasOwnProperty(t)) {
var n = X[t],
i = n.length;
if (e.substr(0, i) == n) return e.substr(i)
}
return e
}(a.toString(16).replace(/^1f+00/, "")) == n(e).toString()
},
e
}(),
X = {
md2: "3020300c06082a864886f70d020205000410",
md5: "3020300c06082a864886f70d020505000410",
sha1: "3021300906052b0e03021a05000414",
sha224: "302d300d06096086480165030402040500041c",
sha256: "3031300d060960864801650304020105000420",
sha384: "3041300d060960864801650304020205000430",
sha512: "3051300d060960864801650304020305000440",
ripemd160: "3021300906052b2403020105000414"
}, ee = {};
ee.lang = {
extend: function(e, t, n) {
if (!t || !e) throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");
var i = function() {};
if (i.prototype = t.prototype,
e.prototype = new i, (e.prototype.constructor = e).superclass = t.prototype,
t.prototype.constructor == Object.prototype.constructor && (t.prototype.constructor = t),
n) {
var a;
for (a in n)
e.prototype[a] = n[a];
var o = function() {}, s = ["toString", "valueOf"];
try {
/MSIE/.test(navigator.userAgent) && (o = function(e, t) {
for (a = 0; a < s.length; a += 1) {
var n = s[a],
i = t[n];
"function" == typeof i && i != Object.prototype[n] && (e[n] = i)
}
})
} catch (t) {乐易助手提示 ('这里返回假,请删除上面的 try/catch代码');
}
o(e.prototype, n)
}
}
};
var te = {};
void 0 !== te.asn1 && te.asn1 || (te.asn1 = {}),
te.asn1.ASN1Util = new function() {
this.integerToByteHex = function(e) {
var t = e.toString(16);
return t.length % 2 == 1 && (t = "0" + t),
t
},
this.bigIntToMinTwosComplementsHex = function(e) {
var t = e.toString(16);
if ("-" != t.substr(0, 1)) t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
else {
var n = t.substr(1).length;
n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
for (var i = "", a = 0; a < n; a++)
i += "f";
t = new I(i, 16).xor(e).add(I.ONE).toString(16).replace(/^-/, "")
}
return t
},
this.getPEMStringFromHex = function(e, t) {
return hextopem(e, t)
},
this.newObject = function(e) {
var t = te.asn1,
n = t.DERBoolean,
i = t.DERInteger,
a = t.DERBitString,
o = t.DEROctetString,
s = t.DERNull,
r = t.DERObjectIdentifier,
c = t.DEREnumerated,
d = t.DERUTF8String,
l = t.DERNumericString,
u = t.DERPrintableString,
h = t.DERTeletexString,
p = t.DERIA5String,
m = t.DERUTCTime,
f = t.DERGeneralizedTime,
g = t.DERSequence,
C = t.DERSet,
v = t.DERTaggedObject,
y = t.ASN1Util.newObject,
b = Object.keys(e);
if (1 != b.length) throw "key of param shall be only one.";
var w = b[0];
if (-1 == ":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + w + ":")) throw "undefined key: " + w;
if ("bool" == w) return new n(e[w]);
if ("int" == w) return new i(e[w]);
if ("bitstr" == w) return new a(e[w]);
if ("octstr" == w) return new o(e[w]);
if ("null" == w) return new s(e[w]);
if ("oid" == w) return new r(e[w]);
if ("enum" == w) return new c(e[w]);
if ("utf8str" == w) return new d(e[w]);
if ("numstr" == w) return new l(e[w]);
if ("prnstr" == w) return new u(e[w]);
if ("telstr" == w) return new h(e[w]);
if ("ia5str" == w) return new p(e[w]);
if ("utctime" == w) return new m(e[w]);
if ("gentime" == w) return new f(e[w]);
if ("seq" == w) {
for (var E = e[w], S = [], x = 0; x < E.length; x++) {
var T = y(E[x]);
S.push(T)
}
return new g({
array: S
})
}
if ("set" == w) {
for (E = e[w],
S = [],
x = 0; x < E.length; x++)
T = y(E[x]),
S.push(T);
return new C({
array: S
})
}
if ("tag" == w) {
var k = e[w];
if ("[object Array]" === Object.prototype.toString.call(k) && 3 == k.length) {
var L = y(k[2]);
return new v({
tag: k[0],
explicit: k[1],
obj: L
})
}
var _ = {};
if (void 0 !== k.explicit && (_.explicit = k.explicit),
void 0 !== k.tag && (_.tag = k.tag),
void 0 === k.obj) throw "obj shall be specified for 'tag'.";
return _.obj = y(k.obj),
new v(_)
}
},
this.jsonToASN1HEX = function(e) {
return this.newObject(e).getEncodedHex()
}
},
te.asn1.ASN1Util.oidHexToInt = function(e) {
for (var t = "", n = parseInt(e.substr(0, 2), 16), i = (t = Math.floor(n / 40) + "." + n % 40,
""), a = 2; a < e.length; a += 2) {
var o = ("00000000" + parseInt(e.substr(a, 2), 16).toString(2)).slice(-8);
i += o.substr(1, 7),
"0" == o.substr(0, 1) && (t = t + "." + new I(i, 2).toString(10),
i = "")
}
return t
},
te.asn1.ASN1Util.oidIntToHex = function(e) {
var t = function(e) {
var t = e.toString(16);
return 1 == t.length && (t = "0" + t),
t
}, n = function(e) {
var n = "",
i = new I(e, 10).toString(2),
a = 7 - i.length % 7;
7 == a && (a = 0);
for (var o = "", s = 0; s < a; s++)
o += "0";
for (i = o + i,
s = 0; s < i.length - 1; s += 7) {
var r = i.substr(s, 7);
s != i.length - 7 && (r = "1" + r),
n += t(parseInt(r, 2))
}
return n
};
if (!e.match(/^[0-9.]+$/)) throw "malformed oid string: " + e;
var i = "",
a = e.split("."),
o = 40 * parseInt(a[0]) + parseInt(a[1]);
i += t(o),
a.splice(0, 2);
for (var s = 0; s < a.length; s++)
i += n(a);
return i
},
te.asn1.ASN1Object = function() {
this.getLengthHexFromValue = function() {
if (void 0 === this.hV || null == this.hV) throw "this.hV is null or undefined.";
if (this.hV.length % 2 == 1) throw "value hex must be even length: n=" + "".length + ",v=" + this.hV;
var e = this.hV.length / 2,
t = e.toString(16);
if (t.length % 2 == 1 && (t = "0" + t),
e < 128) return t;
var n = t.length / 2;
if (15 < n) throw "ASN.1 length too long to represent by 8x: n = " + e.toString(16);
return (128 + n).toString(16) + t
},
this.getEncodedHex = function() {
return (null == this.hTLV || this.isModified) && (this.hV = this.getFreshValueHex(),
this.hL = this.getLengthHexFromValue(),
this.hTLV = this.hT + this.hL + this.hV,
this.isModified = !1),
this.hTLV
},
this.getValueHex = function() {
return this.getEncodedHex(),
this.hV
},
this.getFreshValueHex = function() {
return ""
}
},
te.asn1.DERAbstractString = function(e) {
te.asn1.DERAbstractString.superclass.constructor.call(this),
this.getString = function() {
return this.s
},
this.setString = function(e) {
this.hTLV = null,
this.isModified = !0,
this.s = e,
this.hV = stohex(this.s)
},
this.setStringHex = function(e) {
this.hTLV = null,
this.isModified = !0,
this.s = null,
this.hV = e
},
this.getFreshValueHex = function() {
return this.hV
},
void 0 !== e && ("string" == typeof e ? this.setString(e) : void 0 !== e.str ? this.setString(e.str) : void 0 !== e.hex && this.setStringHex(e.hex))
},
ee.lang.extend(te.asn1.DERAbstractString, te.asn1.ASN1Object),
te.asn1.DERAbstractTime = function(e) {
te.asn1.DERAbstractTime.superclass.constructor.call(this),
this.localDateToUTC = function(e) {
return utc = e.getTime() + 6e4 * e.getTimezoneOffset(),
new Date(utc)
},
this.formatDate = function(e, t, n) {
var i = this.zeroPadding,
a = this.localDateToUTC(e),
o = String(a.getFullYear());
"utc" == t && (o = o.substr(2, 2));
var s = o + i(String(a.getMonth() + 1), 2) + i(String(a.getDate()), 2) + i(String(a.getHours()), 2) + i(String(a.getMinutes()), 2) + i(String(a.getSeconds()), 2);
if (!0 === n) {
var r = a.getMilliseconds();
if (0 != r) {
var c = i(String(r), 3);
s = s + "." + (c = c.replace(/[0]+$/, ""))
}
}
return s + "Z"
},
this.zeroPadding = function(e, t) {
return e.length >= t ? e : new Array(t - e.length + 1).join("0") + e
},
this.getString = function() {
return this.s
},
this.setString = function(e) {
this.hTLV = null,
this.isModified = !0,
this.s = e,
this.hV = stohex(e)
},
this.setByDateValue = function(e, t, n, i, a, o) {
var s = new Date(Date.UTC(e, t - 1, n, i, a, o, 0));
this.setByDate(s)
},
this.getFreshValueHex = function() {
return this.hV
}
},
ee.lang.extend(te.asn1.DERAbstractTime, te.asn1.ASN1Object),
te.asn1.DERAbstractStructured = function(e) {
te.asn1.DERAbstractString.superclass.constructor.call(this),
this.setByASN1ObjectArray = function(e) {
this.hTLV = null,
this.isModified = !0,
this.asn1Array = e
},
this.appendASN1Object = function(e) {
this.hTLV = null,
this.isModified = !0,
this.asn1Array.push(e)
},
this.asn1Array = new Array,
void 0 !== e && void 0 !== e.array && (this.asn1Array = e.array)
},
ee.lang.extend(te.asn1.DERAbstractStructured, te.asn1.ASN1Object),
te.asn1.DERBoolean = function() {
te.asn1.DERBoolean.superclass.constructor.call(this),
this.hT = "01",
this.hTLV = "0101ff"
},
ee.lang.extend(te.asn1.DERBoolean, te.asn1.ASN1Object),
te.asn1.DERInteger = function(e) {
te.asn1.DERInteger.superclass.constructor.call(this),
this.hT = "02",
this.setByBigInteger = function(e) {
this.hTLV = null,
this.isModified = !0,
this.hV = te.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)
},
this.setByInteger = function(e) {
var t = new I(String(e), 10);
this.setByBigInteger(t)
},
this.setValueHex = function(e) {
this.hV = e
},
this.getFreshValueHex = function() {
return this.hV
},
void 0 !== e && (void 0 !== e.bigint ? this.setByBigInteger(e.bigint) : void 0 !== e.int ? this.setByInteger(e.int) : "number" == typeof e ? this.setByInteger(e) : void 0 !== e.hex && this.setValueHex(e.hex))
},
ee.lang.extend(te.asn1.DERInteger, te.asn1.ASN1Object),
te.asn1.DERBitString = function(e) {
if (void 0 !== e && void 0 !== e.obj) {
var t = te.asn1.ASN1Util.newObject(e.obj);
e.hex = "00" + t.getEncodedHex()
}
te.asn1.DERBitString.superclass.constructor.call(this),
this.hT = "03",
this.setHexValueIncludingUnusedBits = function(e) {
this.hTLV = null,
this.isModified = !0,
this.hV = e
},
this.setUnusedBitsAndHexValue = function(e, t) {
if (e < 0 || 7 < e) throw "unused bits shall be from 0 to 7: u = " + e;
var n = "0" + e;
this.hTLV = null,
this.isModified = !0,
this.hV = n + t
},
this.setByBinaryString = function(e) {
var t = 8 - (e = e.replace(/0+$/, "")).length % 8;
8 == t && (t = 0);
for (var n = 0; n <= t; n++)
e += "0";
var i = "";
for (n = 0; n < e.length - 1; n += 8) {
var a = e.substr(n, 8),
o = parseInt(a, 2).toString(16);
1 == o.length && (o = "0" + o),
i += o
}
this.hTLV = null,
this.isModified = !0,
this.hV = "0" + t + i
},
this.setByBooleanArray = function(e) {
for (var t = "", n = 0; n < e.length; n++)
1 == e[n] ? t += "1" : t += "0";
this.setByBinaryString(t)
},
this.newFalseArray = function(e) {
for (var t = new Array(e), n = 0; n < e; n++)
t[n] = !1;
return t
},
this.getFreshValueHex = function() {
return this.hV
},
void 0 !== e && ("string" == typeof e && e.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(e) : void 0 !== e.hex ? this.setHexValueIncludingUnusedBits(e.hex) : void 0 !== e.bin ? this.setByBinaryString(e.bin) : void 0 !== e.array && this.setByBooleanArray(e.array))
},
ee.lang.extend(te.asn1.DERBitString, te.asn1.ASN1Object),
te.asn1.DEROctetString = function(e) {
if (void 0 !== e && void 0 !== e.obj) {
var t = te.asn1.ASN1Util.newObject(e.obj);
e.hex = t.getEncodedHex()
}
te.asn1.DEROctetString.superclass.constructor.call(this, e),
this.hT = "04"
},
ee.lang.extend(te.asn1.DEROctetString, te.asn1.DERAbstractString),
te.asn1.DERNull = function() {
te.asn1.DERNull.superclass.constructor.call(this),
this.hT = "05",
this.hTLV = "0500"
},
ee.lang.extend(te.asn1.DERNull, te.asn1.ASN1Object),
te.asn1.DERObjectIdentifier = function(e) {
var t = function(e) {
var t = e.toString(16);
return 1 == t.length && (t = "0" + t),
t
}, n = function(e) {
var n = "",
i = new I(e, 10).toString(2),
a = 7 - i.length % 7;
7 == a && (a = 0);
for (var o = "", s = 0; s < a; s++)
o += "0";
for (i = o + i,
s = 0; s < i.length - 1; s += 7) {
var r = i.substr(s, 7);
s != i.length - 7 && (r = "1" + r),
n += t(parseInt(r, 2))
}
return n
};
te.asn1.DERObjectIdentifier.superclass.constructor.call(this),
this.hT = "06",
this.setValueHex = function(e) {
this.hTLV = null,
this.isModified = !0,
this.s = null,
this.hV = e
},
this.setValueOidString = function(e) {
if (!e.match(/^[0-9.]+$/)) throw "malformed oid string: " + e;
var i = "",
a = e.split("."),
o = 40 * parseInt(a[0]) + parseInt(a[1]);
i += t(o),
a.splice(0, 2);
for (var s = 0; s < a.length; s++)
i += n(a);
this.hTLV = null,
this.isModified = !0,
this.s = null,
this.hV = i
},
this.setValueName = function(e) {
var t = te.asn1.x509.OID.name2oid(e);
if ("" === t) throw "DERObjectIdentifier oidName undefined: " + e;
this.setValueOidString(t)
},
this.getFreshValueHex = function() {
return this.hV
},
void 0 !== e && ("string" == typeof e ? e.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(e) : this.setValueName(e) : void 0 !== e.oid ? this.setValueOidString(e.oid) : void 0 !== e.hex ? this.setValueHex(e.hex) : void 0 !== e.name && this.setValueName(e.name))
},
ee.lang.extend(te.asn1.DERObjectIdentifier, te.asn1.ASN1Object),
te.asn1.DEREnumerated = function(e) {
te.asn1.DEREnumerated.superclass.constructor.call(this),
this.hT = "0a",
this.setByBigInteger = function(e) {
this.hTLV = null,
this.isModified = !0,
this.hV = te.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)
},
this.setByInteger = function(e) {
var t = new I(String(e), 10);
this.setByBigInteger(t)
},
this.setValueHex = function(e) {
this.hV = e
},
this.getFreshValueHex = function() {
return this.hV
},
void 0 !== e && (void 0 !== e.int ? this.setByInteger(e.int) : "number" == typeof e ? this.setByInteger(e) : void 0 !== e.hex && this.setValueHex(e.hex))
},
ee.lang.extend(te.asn1.DEREnumerated, te.asn1.ASN1Object),
te.asn1.DERUTF8String = function(e) {
te.asn1.DERUTF8String.superclass.constructor.call(this, e),
this.hT = "0c"
},
ee.lang.extend(te.asn1.DERUTF8String, te.asn1.DERAbstractString),
te.asn1.DERNumericString = function(e) {
te.asn1.DERNumericString.superclass.constructor.call(this, e),
this.hT = "12"
},
ee.lang.extend(te.asn1.DERNumericString, te.asn1.DERAbstractString),
te.asn1.DERPrintableString = function(e) {
te.asn1.DERPrintableString.superclass.constructor.call(this, e),
this.hT = "13"
},
ee.lang.extend(te.asn1.DERPrintableString, te.asn1.DERAbstractString),
te.asn1.DERTeletexString = function(e) {
te.asn1.DERTeletexString.superclass.constructor.call(this, e),
this.hT = "14"
},
ee.lang.extend(te.asn1.DERTeletexString, te.asn1.DERAbstractString),
te.asn1.DERIA5String = function(e) {
te.asn1.DERIA5String.superclass.constructor.call(this, e),
this.hT = "16"
},
ee.lang.extend(te.asn1.DERIA5String, te.asn1.DERAbstractString),
te.asn1.DERUTCTime = function(e) {
te.asn1.DERUTCTime.superclass.constructor.call(this, e),
this.hT = "17",
this.setByDate = function(e) {
this.hTLV = null,
this.isModified = !0,
this.date = e,
this.s = this.formatDate(this.date, "utc"),
this.hV = stohex(this.s)
},
this.getFreshValueHex = function() {
return void 0 === this.date && void 0 === this.s && (this.date = new Date,
this.s = this.formatDate(this.date, "utc"),
this.hV = stohex(this.s)),
this.hV
},
void 0 !== e && (void 0 !== e.str ? this.setString(e.str) : "string" == typeof e && e.match(/^[0-9]{12}Z$/) ? this.setString(e) : void 0 !== e.hex ? this.setStringHex(e.hex) : void 0 !== e.date && this.setByDate(e.date))
},
ee.lang.extend(te.asn1.DERUTCTime, te.asn1.DERAbstractTime),
te.asn1.DERGeneralizedTime = function(e) {
te.asn1.DERGeneralizedTime.superclass.constructor.call(this, e),
this.hT = "18",
this.withMillis = !1,
this.setByDate = function(e) {
this.hTLV = null,
this.isModified = !0,
this.date = e,
this.s = this.formatDate(this.date, "gen", this.withMillis),
this.hV = stohex(this.s)
},
this.getFreshValueHex = function() {
return void 0 === this.date && void 0 === this.s && (this.date = new Date,
this.s = this.formatDate(this.date, "gen", this.withMillis),
this.hV = stohex(this.s)),
this.hV
},
void 0 !== e && (void 0 !== e.str ? this.setString(e.str) : "string" == typeof e && e.match(/^[0-9]{14}Z$/) ? this.setString(e) : void 0 !== e.hex ? this.setStringHex(e.hex) : void 0 !== e.date && this.setByDate(e.date), !0 === e.millis && (this.withMillis = !0))
},
ee.lang.extend(te.asn1.DERGeneralizedTime, te.asn1.DERAbstractTime),
te.asn1.DERSequence = function(e) {
te.asn1.DERSequence.superclass.constructor.call(this, e),
this.hT = "30",
this.getFreshValueHex = function() {
for (var e = "", t = 0; t < this.asn1Array.length; t++)
e += this.asn1Array[t].getEncodedHex();
return this.hV = e,
this.hV
}
},
ee.lang.extend(te.asn1.DERSequence, te.asn1.DERAbstractStructured),
te.asn1.DERSet = function(e) {
te.asn1.DERSet.superclass.constructor.call(this, e),
this.hT = "31",
this.sortFlag = !0,
this.getFreshValueHex = function() {
for (var e = new Array, t = 0; t < this.asn1Array.length; t++) {
var n = this.asn1Array[t];
e.push(n.getEncodedHex())
}
return 1 == this.sortFlag && e.sort(),
this.hV = e.join(""),
this.hV
},
void 0 !== e && void 0 !== e.sortflag && 0 == e.sortflag && (this.sortFlag = !1)
},
ee.lang.extend(te.asn1.DERSet, te.asn1.DERAbstractStructured),
te.asn1.DERTaggedObject = function(e) {
te.asn1.DERTaggedObject.superclass.constructor.call(this),
this.hT = "a0",
this.hV = "",
this.isExplicit = !0,
this.asn1Object = null,
this.setASN1Object = function(e, t, n) {
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)
},
this.getFreshValueHex = function() {
return this.hV
},
void 0 !== e && (void 0 !== e.tag && (this.hT = e.tag),
void 0 !== e.explicit && (this.isExplicit = e.explicit),
void 0 !== e.obj && (this.asn1Object = e.obj,
this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)))
},
ee.lang.extend(te.asn1.DERTaggedObject, te.asn1.ASN1Object);
var ne = function(e) {
function t(n) {
var i = e.call(this) || this;
return n && ("string" == typeof n ? i.parseKey(n) : (t.hasPrivateKeyProperty(n) || t.hasPublicKeyProperty(n)) && i.parsePropertiesFrom(n)),
i
}
return function(e, t) {
function n() {
this.constructor = e
}
m(e, t),
e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype,
new n)
}(t, e),
t.prototype.parseKey = function(e) {
var t = 0,
n = 0,
i = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e) ? f(e) : g.unarmor(e),
a = T.decode(i);
if (3 === a.sub.length && (a = a.sub[2].sub[0]),
9 === a.sub.length) {
t = a.sub[1].getHexStringValue(),
this.n = F(t, 16),
n = a.sub[2].getHexStringValue(),
this.e = parseInt(n, 16);
var o = a.sub[3].getHexStringValue();
this.d = F(o, 16);
var s = a.sub[4].getHexStringValue();
this.p = F(s, 16);
var r = a.sub[5].getHexStringValue();
this.q = F(r, 16);
var c = a.sub[6].getHexStringValue();
this.dmp1 = F(c, 16);
var d = a.sub[7].getHexStringValue();
this.dmq1 = F(d, 16);
var l = a.sub[8].getHexStringValue();
this.coeff = F(l, 16)
} else {
if (2 !== a.sub.length) return !1;
var u = a.sub[1].sub[0];
t = u.sub[0].getHexStringValue(),
this.n = F(t, 16),
n = u.sub[1].getHexStringValue(),
this.e = parseInt(n, 16)
}
return !0
},
t.prototype.getPrivateBaseKey = function() {
var e = {
array: [new te.asn1.DERInteger({
int: 0
}), new te.asn1.DERInteger({
bigint: this.n
}), new te.asn1.DERInteger({
int: this.e
}), new te.asn1.DERInteger({
bigint: this.d
}), new te.asn1.DERInteger({
bigint: this.p
}), new te.asn1.DERInteger({
bigint: this.q
}), new te.asn1.DERInteger({
bigint: this.dmp1
}), new te.asn1.DERInteger({
bigint: this.dmq1
}), new te.asn1.DERInteger({
bigint: this.coeff
})]
};
return new te.asn1.DERSequence(e).getEncodedHex()
},
t.prototype.getPrivateBaseKeyB64 = function() {
return l(this.getPrivateBaseKey())
},
t.prototype.getPublicBaseKey = function() {
var e = new te.asn1.DERSequence({
array: [new te.asn1.DERObjectIdentifier({
oid: "1.2.840.113549.1.1.1"
}), new te.asn1.DERNull]
}),
t = new te.asn1.DERSequence({
array: [new te.asn1.DERInteger({
bigint: this.n
}), new te.asn1.DERInteger({
int: this.e
})]
}),
n = new te.asn1.DERBitString({
hex: "00" + t.getEncodedHex()
});
return new te.asn1.DERSequence({
array: [e, n]
}).getEncodedHex()
},
t.prototype.getPublicBaseKeyB64 = function() {
return l(this.getPublicBaseKey())
},
t.wordwrap = function(e, t) {
if (!e) return e;
var n = "(.{1," + (t = t || 64) + "})( +|$\n?)|(.{1," + t + "})";
return e.match(RegExp(n, "g")).join("\n")
},
t.prototype.getPrivateKey = function() {
var e = "-----BEGIN RSA PRIVATE KEY-----\n";
return e += t.wordwrap(this.getPrivateBaseKeyB64()) + "\n",
e + "-----END RSA PRIVATE KEY-----"
},
t.prototype.getPublicKey = function() {
var e = "-----BEGIN PUBLIC KEY-----\n";
return e += t.wordwrap(this.getPublicBaseKeyB64()) + "\n",
e + "-----END PUBLIC KEY-----"
},
t.hasPublicKeyProperty = function(e) {
return (e = e || {}).hasOwnProperty("n") && e.hasOwnProperty("e")
},
t.hasPrivateKeyProperty = function(e) {
return (e = e || {}).hasOwnProperty("n") && e.hasOwnProperty("e") && e.hasOwnProperty("d") && e.hasOwnProperty("p") && e.hasOwnProperty("q") && e.hasOwnProperty("dmp1") && e.hasOwnProperty("dmq1") && e.hasOwnProperty("coeff")
},
t.prototype.parsePropertiesFrom = function(e) {
this.n = e.n,
this.e = e.e,
e.hasOwnProperty("d") && (this.d = e.d,
this.p = e.p,
this.q = e.q,
this.dmp1 = e.dmp1,
this.dmq1 = e.dmq1,
this.coeff = e.coeff)
},
t
}(Q),
ie = function() {
function e(e) {
e = e || {},
this.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
}
return e.prototype.setKey = function(e) {
this.log && this.key,
this.key = new ne(e)
},
e.prototype.setPrivateKey = function(e) {
this.setKey(e)
},
e.prototype.setPublicKey = function(e) {
this.setKey(e)
},
e.prototype.decrypt = function(e) {
try {
return this.getKey().decrypt(u(e))
} catch (t) {乐易助手提示 ('这里返回假,请删除上面的 try/catch代码');
return !1
}
},
e.prototype.encrypt = function(e) {
try {
return l(this.getKey().encrypt(e))
} catch (t) {乐易助手提示 ('这里返回假,请删除上面的 try/catch代码');
return !1
}
},
e.prototype.sign = function(e, t, n) {
try {
return l(this.getKey().sign(e, t, n))
} catch (t) {乐易助手提示 ('这里返回假,请删除上面的 try/catch代码');
return !1
}
},
e.prototype.verify = function(e, t, n) {
try {
return this.getKey().verify(e, u(t), n)
} catch (t) {乐易助手提示 ('这里返回假,请删除上面的 try/catch代码');
return !1
}
},
e.prototype.getKey = function(e) {
if (!this.key) {
if (this.key = new ne,
e && "[object Function]" === {}.toString.call(e)) return void this.key.generateAsync(this.default_key_size, this.default_public_exponent, e);
this.key.generate(this.default_key_size, this.default_public_exponent)
}
return this.key
},
e.prototype.getPrivateKey = function() {
return this.getKey().getPrivateKey()
},
e.prototype.getPrivateKeyB64 = function() {
return this.getKey().getPrivateBaseKeyB64()
},
e.prototype.getPublicKey = function() {
return this.getKey().getPublicKey()
},
e.prototype.getPublicKeyB64 = function() {
return this.getKey().getPublicBaseKeyB64()
},
e.version = "3.0.0-rc.1",
e
}();
window.JSEncrypt = ie
}();
function encrypt(data) {
var en = new JSEncrypt('');
en.setPublicKey('MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCkC+bjmkhGr6oHpeDWC68+JsOwPUdZs5LiShcvTf6d89KSEL8sfrxRvuMDr7tQA1KVbX7/qR8zhnyGnZfKQDC6F0/0haK+ivipCSM8M3aKhxPvhB3BBXmG6idiIK/D8tutODRF3zeNZDyKZjS5w3INJ2WoLOHHoN1uF9WRCUmKpwIDAQAB');
return en.encrypt(data)
}