@zohocorporation/vault-cli 1.1.2

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.
Files changed (102) hide show
  1. package/README.md +16 -0
  2. package/out/commands/add/add.const.js +6 -0
  3. package/out/commands/add/add.types.js +2 -0
  4. package/out/commands/add/add.util.js +35 -0
  5. package/out/commands/download/download.const.js +6 -0
  6. package/out/commands/download/download.types.js +2 -0
  7. package/out/commands/download/download.utils.js +35 -0
  8. package/out/commands/generate-password/generate-password.const.js +12 -0
  9. package/out/commands/generate-password/generate-password.types.js +2 -0
  10. package/out/commands/generate-password/generate-password.utils.js +58 -0
  11. package/out/commands/generate-template/generate-template.const.js +7 -0
  12. package/out/commands/generate-template/generate-template.types.js +2 -0
  13. package/out/commands/generate-template/generate-template.util.js +37 -0
  14. package/out/commands/get/get.const.js +8 -0
  15. package/out/commands/get/get.types.js +2 -0
  16. package/out/commands/get/get.utils.js +45 -0
  17. package/out/commands/get-default/get-default.const.js +5 -0
  18. package/out/commands/get-default/get-default.types.js +2 -0
  19. package/out/commands/get-default/get-default.utils.js +33 -0
  20. package/out/commands/list/list.const.js +7 -0
  21. package/out/commands/list/list.types.js +2 -0
  22. package/out/commands/list/list.utils.js +43 -0
  23. package/out/commands/lock/lock.action.js +13 -0
  24. package/out/commands/lock/lock.js +10 -0
  25. package/out/commands/lock/lock.utils.js +52 -0
  26. package/out/commands/login/login.action.js +22 -0
  27. package/out/commands/login/login.const.js +10 -0
  28. package/out/commands/login/login.help.js +12 -0
  29. package/out/commands/login/login.js +17 -0
  30. package/out/commands/login/login.types.js +5 -0
  31. package/out/commands/login/login.utils.js +307 -0
  32. package/out/commands/reset/reset.action.js +28 -0
  33. package/out/commands/reset/reset.help.js +8 -0
  34. package/out/commands/reset/reset.js +14 -0
  35. package/out/commands/reset/reset.utils.js +2 -0
  36. package/out/commands/search/search.action.js +30 -0
  37. package/out/commands/search/search.constants.js +14 -0
  38. package/out/commands/search/search.help.js +6 -0
  39. package/out/commands/search/search.js +26 -0
  40. package/out/commands/search/search.types.js +16 -0
  41. package/out/commands/search/search.utils.js +61 -0
  42. package/out/commands/set-default/set-default.const.js +6 -0
  43. package/out/commands/set-default/set-default.types.js +2 -0
  44. package/out/commands/set-default/set-default.utils.js +39 -0
  45. package/out/commands/unlock/unlock.action.js +23 -0
  46. package/out/commands/unlock/unlock.help.js +2 -0
  47. package/out/commands/unlock/unlock.js +12 -0
  48. package/out/commands/unlock/unlock.type.js +2 -0
  49. package/out/commands/unlock/unlock.utils.js +133 -0
  50. package/out/js/I18n/index.js +80 -0
  51. package/out/js/I18n/resources/CLI_I18N_en.js +173 -0
  52. package/out/js/I18n/resources/CLI_I18N_es.js +3 -0
  53. package/out/js/I18n/resources/CLI_I18N_fr.js +3 -0
  54. package/out/js/I18n/resources/CLI_I18N_nl.js +3 -0
  55. package/out/js/I18n/resources/CLI_I18N_pt.js +3 -0
  56. package/out/js/I18n/resources/CLI_I18N_zh.js +3 -0
  57. package/out/js/crypto/aes.js +225 -0
  58. package/out/js/crypto/index.js +139 -0
  59. package/out/js/crypto/rsa.js +1945 -0
  60. package/out/js/crypto/zohovault.js +671 -0
  61. package/out/js/logger/index.js +10 -0
  62. package/out/old/Add.js +590 -0
  63. package/out/old/Default.js +209 -0
  64. package/out/old/Download.js +69 -0
  65. package/out/old/Generate.js +171 -0
  66. package/out/old/Get.js +225 -0
  67. package/out/old/List.js +197 -0
  68. package/out/old/Login.js +287 -0
  69. package/out/old/Logout.js +21 -0
  70. package/out/old/PasswordGenerator.js +718 -0
  71. package/out/old/PasswordPolicies.js +21 -0
  72. package/out/old/PasswordTypes.js +33 -0
  73. package/out/old/Update.js +682 -0
  74. package/out/old/cmd/addcmd.js +59 -0
  75. package/out/old/cmd/downloadcmd.js +76 -0
  76. package/out/old/cmd/generate-passwordcmd.js +127 -0
  77. package/out/old/cmd/generate-templatecmd.js +59 -0
  78. package/out/old/cmd/get-defaultcmd.js +48 -0
  79. package/out/old/cmd/getcmd.js +57 -0
  80. package/out/old/cmd/listcmd.js +54 -0
  81. package/out/old/cmd/logoutcmd.js +31 -0
  82. package/out/old/cmd/set-default.js +75 -0
  83. package/out/old/cmd/updatecmd.js +44 -0
  84. package/out/old/index.js +580 -0
  85. package/out/util/configuration.util.js +103 -0
  86. package/out/util/consts.util.js +97 -0
  87. package/out/util/dbutils/db.types.js +2 -0
  88. package/out/util/dbutils/db.utils.js +164 -0
  89. package/out/util/dbutils/dbtable.utils.js +19 -0
  90. package/out/util/dev.utils.js +14 -0
  91. package/out/util/encryptionutil/encryption.uitl.js +108 -0
  92. package/out/util/index.util.js +341 -0
  93. package/out/util/keyringutil/keyring.util.js +57 -0
  94. package/out/util/loader/loader.interface.js +2 -0
  95. package/out/util/loader/transfer.loader.js +28 -0
  96. package/out/util/login.util.js +352 -0
  97. package/out/util/passwordtypes.util.js +91 -0
  98. package/out/util/print.util.js +4 -0
  99. package/out/util/search.util.js +359 -0
  100. package/out/util/types.util.js +7 -0
  101. package/out/zv.js +41 -0
  102. package/package.json +96 -0
@@ -0,0 +1,1945 @@
1
+ // Depends on jsbn.js and rng.js
2
+ // Version 1.1: support utf-8 encoding in pkcs1pad2
3
+ // convert a (hex) string to a bignum object
4
+ /*function parseBigInt(str,r) {
5
+ return new BigInteger(str,r);
6
+ }*/
7
+ //
8
+ // function linebrk(s,n) {
9
+ // var ret = "";
10
+ // var i = 0;
11
+ // while(i + n < s.length) {
12
+ // ret += s.substring(i,i+n) + "\n";
13
+ // i += n;
14
+ // }
15
+ // return ret + s.substring(i,s.length);
16
+ // }
17
+ //
18
+ // function byte2Hex(b) {
19
+ // if(b < 0x10)
20
+ // return "0" + b.toString(16);
21
+ // else
22
+ // return b.toString(16);
23
+ // }
24
+ // PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint
25
+ /*function pkcs1pad2(s,n) {
26
+ if(n < s.length + 11) { // TODO: fix for utf-8
27
+ alert("Message too long for RSA");
28
+ return null;
29
+ }
30
+ var ba = new Array();
31
+ var i = s.length - 1;
32
+ while(i >= 0 && n > 0) {
33
+ var c = s.charCodeAt(i--);
34
+ if(c < 128) { // encode using utf-8
35
+ ba[--n] = c;
36
+ }
37
+ else if((c > 127) && (c < 2048)) {
38
+ ba[--n] = (c & 63) | 128;
39
+ ba[--n] = (c >> 6) | 192;
40
+ }
41
+ else {
42
+ ba[--n] = (c & 63) | 128;
43
+ ba[--n] = ((c >> 6) & 63) | 128;
44
+ ba[--n] = (c >> 12) | 224;
45
+ }
46
+ }
47
+ ba[--n] = 0;
48
+ var rng = new SecureRandom();
49
+ var x = new Array();
50
+ while(n > 2) { // random non-zero pad
51
+ x[0] = 0;
52
+ while(x[0] == 0) rng.nextBytes(x);
53
+ ba[--n] = x[0];
54
+ }
55
+ ba[--n] = 2;
56
+ ba[--n] = 0;
57
+ return new BigInteger(ba);
58
+ }*/
59
+ // "empty" RSA key constructor
60
+ /*function RSAKey() {
61
+ this.n = null;
62
+ this.e = 0;
63
+ this.d = null;
64
+ this.p = null;
65
+ this.q = null;
66
+ this.dmp1 = null;
67
+ this.dmq1 = null;
68
+ this.coeff = null;
69
+ }*/
70
+ /*
71
+ // Set the public key fields N and e from hex strings
72
+ function RSASetPublic(N,E) {
73
+ if(N != null && E != null && N.length > 0 && E.length > 0) {
74
+ this.n = parseBigInt(N,16);
75
+ this.e = parseInt(E,16);
76
+ }
77
+ else
78
+ alert("Invalid RSA public key");
79
+ }
80
+
81
+ // Perform raw public operation on "x": return x^e (mod n)
82
+ function RSADoPublic(x) {
83
+ return x.modPowInt(this.e, this.n);
84
+ }
85
+
86
+ // Return the PKCS#1 RSA encryption of "text" as an even-length hex string
87
+ function RSAEncrypt(text) {
88
+ var m = pkcs1pad2(text,(this.n.bitLength()+7)>>3);
89
+ if(m == null) return null;
90
+ var c = this.doPublic(m);
91
+ if(c == null) return null;
92
+ var h = c.toString(16);
93
+ if((h.length & 1) == 0) return h; else return "0" + h;
94
+ }*/
95
+ // Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string
96
+ //function RSAEncryptB64(text) {
97
+ // var h = this.encrypt(text);
98
+ // if(h) return hex2b64(h); else return null;
99
+ //}
100
+ // protected
101
+ // RSAKey.prototype.doPublic = RSADoPublic;
102
+ // public
103
+ // RSAKey.prototype.setPublic = RSASetPublic;
104
+ // RSAKey.prototype.encrypt = RSAEncrypt;
105
+ //RSAKey.prototype.encrypt_b64 = RSAEncryptB64;
106
+ let navigator = {};
107
+ navigator.appName = "";
108
+ function BigInteger(a, b, c) {
109
+ null != a &&
110
+ ("number" == typeof a
111
+ ? this.fromNumber(a, b, c)
112
+ : null == b && "string" != typeof a
113
+ ? this.fromString(a, 256)
114
+ : this.fromString(a, b));
115
+ }
116
+ function nbi() {
117
+ return new BigInteger(null);
118
+ }
119
+ function am1(i, x, w, j, c, n) {
120
+ for (; --n >= 0;) {
121
+ var v = x * this[i++] + w[j] + c;
122
+ (c = Math.floor(v / 67108864)), (w[j++] = 67108863 & v);
123
+ }
124
+ return c;
125
+ }
126
+ function am2(i, x, w, j, c, n) {
127
+ for (var xl = 32767 & x, xh = x >> 15; --n >= 0;) {
128
+ var l = 32767 & this[i], h = this[i++] >> 15, m = xh * l + h * xl;
129
+ (l = xl * l + ((32767 & m) << 15) + w[j] + (1073741823 & c)),
130
+ (c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30)),
131
+ (w[j++] = 1073741823 & l);
132
+ }
133
+ return c;
134
+ }
135
+ function am3(i, x, w, j, c, n) {
136
+ for (var xl = 16383 & x, xh = x >> 14; --n >= 0;) {
137
+ var l = 16383 & this[i], h = this[i++] >> 14, m = xh * l + h * xl;
138
+ (l = xl * l + ((16383 & m) << 14) + w[j] + c),
139
+ (c = (l >> 28) + (m >> 14) + xh * h),
140
+ (w[j++] = 268435455 & l);
141
+ }
142
+ return c;
143
+ }
144
+ function int2char(n) {
145
+ return BI_RM.charAt(n);
146
+ }
147
+ function intAt(s, i) {
148
+ var c = BI_RC[s.charCodeAt(i)];
149
+ return null == c ? -1 : c;
150
+ }
151
+ function bnpCopyTo(r) {
152
+ for (var i = this.t - 1; i >= 0; --i)
153
+ r[i] = this[i];
154
+ (r.t = this.t), (r.s = this.s);
155
+ }
156
+ function bnpFromInt(x) {
157
+ (this.t = 1),
158
+ (this.s = 0 > x ? -1 : 0),
159
+ x > 0 ? (this[0] = x) : -1 > x ? (this[0] = x + DV) : (this.t = 0);
160
+ }
161
+ function nbv(i) {
162
+ var r = nbi();
163
+ return r.fromInt(i), r;
164
+ }
165
+ function bnpFromString(s, b) {
166
+ var k;
167
+ if (16 == b)
168
+ k = 4;
169
+ else if (8 == b)
170
+ k = 3;
171
+ else if (256 == b)
172
+ k = 8;
173
+ else if (2 == b)
174
+ k = 1;
175
+ else if (32 == b)
176
+ k = 5;
177
+ else {
178
+ if (4 != b)
179
+ return void this.fromRadix(s, b);
180
+ k = 2;
181
+ }
182
+ (this.t = 0), (this.s = 0);
183
+ for (var i = s.length, mi = !1, sh = 0; --i >= 0;) {
184
+ var x = 8 == k ? 255 & s[i] : intAt(s, i);
185
+ 0 > x
186
+ ? "-" == s.charAt(i) && (mi = !0)
187
+ : ((mi = !1),
188
+ 0 == sh
189
+ ? (this[this.t++] = x)
190
+ : sh + k > this.DB
191
+ ? ((this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh),
192
+ (this[this.t++] = x >> (this.DB - sh)))
193
+ : (this[this.t - 1] |= x << sh),
194
+ (sh += k),
195
+ sh >= this.DB && (sh -= this.DB));
196
+ }
197
+ 8 == k &&
198
+ 0 != (128 & s[0]) &&
199
+ ((this.s = -1),
200
+ sh > 0 && (this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh)),
201
+ this.clamp(),
202
+ mi && BigInteger.ZERO.subTo(this, this);
203
+ }
204
+ function bnpClamp() {
205
+ for (var c = this.s & this.DM; this.t > 0 && this[this.t - 1] == c;)
206
+ --this.t;
207
+ }
208
+ function bnToString(b) {
209
+ if (this.s < 0)
210
+ return "-" + this.negate().toString(b);
211
+ var k;
212
+ if (16 == b)
213
+ k = 4;
214
+ else if (8 == b)
215
+ k = 3;
216
+ else if (2 == b)
217
+ k = 1;
218
+ else if (32 == b)
219
+ k = 5;
220
+ else {
221
+ if (4 != b)
222
+ return this.toRadix(b);
223
+ k = 2;
224
+ }
225
+ var d, km = (1 << k) - 1, m = !1, r = "", i = this.t, p = this.DB - ((i * this.DB) % k);
226
+ if (i-- > 0)
227
+ for (p < this.DB && (d = this[i] >> p) > 0 && ((m = !0), (r = int2char(d))); i >= 0;)
228
+ k > p
229
+ ? ((d = (this[i] & ((1 << p) - 1)) << (k - p)),
230
+ (d |= this[--i] >> (p += this.DB - k)))
231
+ : ((d = (this[i] >> (p -= k)) & km), 0 >= p && ((p += this.DB), --i)),
232
+ d > 0 && (m = !0),
233
+ m && (r += int2char(d));
234
+ return m ? r : "0";
235
+ }
236
+ function bnNegate() {
237
+ var r = nbi();
238
+ return BigInteger.ZERO.subTo(this, r), r;
239
+ }
240
+ function bnAbs() {
241
+ return this.s < 0 ? this.negate() : this;
242
+ }
243
+ function bnCompareTo(a) {
244
+ var r = this.s - a.s;
245
+ if (0 != r)
246
+ return r;
247
+ var i = this.t;
248
+ if (((r = i - a.t), 0 != r))
249
+ return r;
250
+ for (; --i >= 0;)
251
+ if (0 != (r = this[i] - a[i]))
252
+ return r;
253
+ return 0;
254
+ }
255
+ function nbits(x) {
256
+ var t, r = 1;
257
+ return (0 != (t = x >>> 16) && ((x = t), (r += 16)),
258
+ 0 != (t = x >> 8) && ((x = t), (r += 8)),
259
+ 0 != (t = x >> 4) && ((x = t), (r += 4)),
260
+ 0 != (t = x >> 2) && ((x = t), (r += 2)),
261
+ 0 != (t = x >> 1) && ((x = t), (r += 1)),
262
+ r);
263
+ }
264
+ function bnBitLength() {
265
+ return this.t <= 0
266
+ ? 0
267
+ : this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));
268
+ }
269
+ function bnpDLShiftTo(n, r) {
270
+ var i;
271
+ for (i = this.t - 1; i >= 0; --i)
272
+ r[i + n] = this[i];
273
+ for (i = n - 1; i >= 0; --i)
274
+ r[i] = 0;
275
+ (r.t = this.t + n), (r.s = this.s);
276
+ }
277
+ function bnpDRShiftTo(n, r) {
278
+ for (var i = n; i < this.t; ++i)
279
+ r[i - n] = this[i];
280
+ (r.t = Math.max(this.t - n, 0)), (r.s = this.s);
281
+ }
282
+ function bnpLShiftTo(n, r) {
283
+ var i, bs = n % this.DB, cbs = this.DB - bs, bm = (1 << cbs) - 1, ds = Math.floor(n / this.DB), c = (this.s << bs) & this.DM;
284
+ for (i = this.t - 1; i >= 0; --i)
285
+ (r[i + ds + 1] = (this[i] >> cbs) | c), (c = (this[i] & bm) << bs);
286
+ for (i = ds - 1; i >= 0; --i)
287
+ r[i] = 0;
288
+ (r[ds] = c), (r.t = this.t + ds + 1), (r.s = this.s), r.clamp();
289
+ }
290
+ function bnpRShiftTo(n, r) {
291
+ r.s = this.s;
292
+ var ds = Math.floor(n / this.DB);
293
+ if (ds >= this.t)
294
+ return void (r.t = 0);
295
+ var bs = n % this.DB, cbs = this.DB - bs, bm = (1 << bs) - 1;
296
+ r[0] = this[ds] >> bs;
297
+ for (var i = ds + 1; i < this.t; ++i)
298
+ (r[i - ds - 1] |= (this[i] & bm) << cbs), (r[i - ds] = this[i] >> bs);
299
+ bs > 0 && (r[this.t - ds - 1] |= (this.s & bm) << cbs),
300
+ (r.t = this.t - ds),
301
+ r.clamp();
302
+ }
303
+ function bnpSubTo(a, r) {
304
+ for (var i = 0, c = 0, m = Math.min(a.t, this.t); m > i;)
305
+ (c += this[i] - a[i]), (r[i++] = c & this.DM), (c >>= this.DB);
306
+ if (a.t < this.t) {
307
+ for (c -= a.s; i < this.t;)
308
+ (c += this[i]), (r[i++] = c & this.DM), (c >>= this.DB);
309
+ c += this.s;
310
+ }
311
+ else {
312
+ for (c += this.s; i < a.t;)
313
+ (c -= a[i]), (r[i++] = c & this.DM), (c >>= this.DB);
314
+ c -= a.s;
315
+ }
316
+ (r.s = 0 > c ? -1 : 0),
317
+ -1 > c ? (r[i++] = this.DV + c) : c > 0 && (r[i++] = c),
318
+ (r.t = i),
319
+ r.clamp();
320
+ }
321
+ function bnpMultiplyTo(a, r) {
322
+ var x = this.abs(), y = a.abs(), i = x.t;
323
+ for (r.t = i + y.t; --i >= 0;)
324
+ r[i] = 0;
325
+ for (i = 0; i < y.t; ++i)
326
+ r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);
327
+ (r.s = 0), r.clamp(), this.s != a.s && BigInteger.ZERO.subTo(r, r);
328
+ }
329
+ function bnpSquareTo(r) {
330
+ for (var x = this.abs(), i = (r.t = 2 * x.t); --i >= 0;)
331
+ r[i] = 0;
332
+ for (i = 0; i < x.t - 1; ++i) {
333
+ var c = x.am(i, x[i], r, 2 * i, 0, 1);
334
+ (r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >=
335
+ x.DV && ((r[i + x.t] -= x.DV), (r[i + x.t + 1] = 1));
336
+ }
337
+ r.t > 0 && (r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1)),
338
+ (r.s = 0),
339
+ r.clamp();
340
+ }
341
+ function bnpDivRemTo(m, q, r) {
342
+ var pm = m.abs();
343
+ if (!(pm.t <= 0)) {
344
+ var pt = this.abs();
345
+ if (pt.t < pm.t)
346
+ return null != q && q.fromInt(0), void (null != r && this.copyTo(r));
347
+ null == r && (r = nbi());
348
+ var y = nbi(), ts = this.s, ms = m.s, nsh = this.DB - nbits(pm[pm.t - 1]);
349
+ nsh > 0
350
+ ? (pm.lShiftTo(nsh, y), pt.lShiftTo(nsh, r))
351
+ : (pm.copyTo(y), pt.copyTo(r));
352
+ var ys = y.t, y0 = y[ys - 1];
353
+ if (0 != y0) {
354
+ var yt = y0 * (1 << this.F1) + (ys > 1 ? y[ys - 2] >> this.F2 : 0), d1 = this.FV / yt, d2 = (1 << this.F1) / yt, e = 1 << this.F2, i = r.t, j = i - ys, t = null == q ? nbi() : q;
355
+ for (y.dlShiftTo(j, t),
356
+ r.compareTo(t) >= 0 && ((r[r.t++] = 1), r.subTo(t, r)),
357
+ BigInteger.ONE.dlShiftTo(ys, t),
358
+ t.subTo(y, y); y.t < ys;)
359
+ y[y.t++] = 0;
360
+ for (; --j >= 0;) {
361
+ var qd = r[--i] == y0 ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);
362
+ if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd)
363
+ for (y.dlShiftTo(j, t), r.subTo(t, r); r[i] < --qd;)
364
+ r.subTo(t, r);
365
+ }
366
+ null != q &&
367
+ (r.drShiftTo(ys, q), ts != ms && BigInteger.ZERO.subTo(q, q)),
368
+ (r.t = ys),
369
+ r.clamp(),
370
+ nsh > 0 && r.rShiftTo(nsh, r),
371
+ 0 > ts && BigInteger.ZERO.subTo(r, r);
372
+ }
373
+ }
374
+ }
375
+ function bnMod(a) {
376
+ var r = nbi();
377
+ return (this.abs().divRemTo(a, null, r),
378
+ this.s < 0 && r.compareTo(BigInteger.ZERO) > 0 && a.subTo(r, r),
379
+ r);
380
+ }
381
+ function Classic(m) {
382
+ this.m = m;
383
+ }
384
+ function cConvert(x) {
385
+ return x.s < 0 || x.compareTo(this.m) >= 0 ? x.mod(this.m) : x;
386
+ }
387
+ function cRevert(x) {
388
+ return x;
389
+ }
390
+ function cReduce(x) {
391
+ x.divRemTo(this.m, null, x);
392
+ }
393
+ function cMulTo(x, y, r) {
394
+ x.multiplyTo(y, r), this.reduce(r);
395
+ }
396
+ function cSqrTo(x, r) {
397
+ x.squareTo(r), this.reduce(r);
398
+ }
399
+ function bnpInvDigit() {
400
+ if (this.t < 1)
401
+ return 0;
402
+ var x = this[0];
403
+ if (0 == (1 & x))
404
+ return 0;
405
+ var y = 3 & x;
406
+ return ((y = (y * (2 - (15 & x) * y)) & 15),
407
+ (y = (y * (2 - (255 & x) * y)) & 255),
408
+ (y = (y * (2 - (((65535 & x) * y) & 65535))) & 65535),
409
+ (y = (y * (2 - ((x * y) % this.DV))) % this.DV),
410
+ y > 0 ? this.DV - y : -y);
411
+ }
412
+ function Montgomery(m) {
413
+ (this.m = m),
414
+ (this.mp = m.invDigit()),
415
+ (this.mpl = 32767 & this.mp),
416
+ (this.mph = this.mp >> 15),
417
+ (this.um = (1 << (m.DB - 15)) - 1),
418
+ (this.mt2 = 2 * m.t);
419
+ }
420
+ function montConvert(x) {
421
+ var r = nbi();
422
+ return (x.abs().dlShiftTo(this.m.t, r),
423
+ r.divRemTo(this.m, null, r),
424
+ x.s < 0 && r.compareTo(BigInteger.ZERO) > 0 && this.m.subTo(r, r),
425
+ r);
426
+ }
427
+ function montRevert(x) {
428
+ var r = nbi();
429
+ return x.copyTo(r), this.reduce(r), r;
430
+ }
431
+ function montReduce(x) {
432
+ for (; x.t <= this.mt2;)
433
+ x[x.t++] = 0;
434
+ for (var i = 0; i < this.m.t; ++i) {
435
+ var j = 32767 & x[i], u0 = (j * this.mpl +
436
+ (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) &
437
+ x.DM;
438
+ for (j = i + this.m.t, x[j] += this.m.am(0, u0, x, i, 0, this.m.t); x[j] >= x.DV;)
439
+ (x[j] -= x.DV), x[++j]++;
440
+ }
441
+ x.clamp(),
442
+ x.drShiftTo(this.m.t, x),
443
+ x.compareTo(this.m) >= 0 && x.subTo(this.m, x);
444
+ }
445
+ function montSqrTo(x, r) {
446
+ x.squareTo(r), this.reduce(r);
447
+ }
448
+ function montMulTo(x, y, r) {
449
+ x.multiplyTo(y, r), this.reduce(r);
450
+ }
451
+ function bnpIsEven() {
452
+ return 0 == (this.t > 0 ? 1 & this[0] : this.s);
453
+ }
454
+ function bnpExp(e, z) {
455
+ if (e > 4294967295 || 1 > e)
456
+ return BigInteger.ONE;
457
+ var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e) - 1;
458
+ for (g.copyTo(r); --i >= 0;)
459
+ if ((z.sqrTo(r, r2), (e & (1 << i)) > 0))
460
+ z.mulTo(r2, g, r);
461
+ else {
462
+ var t = r;
463
+ (r = r2), (r2 = t);
464
+ }
465
+ return z.revert(r);
466
+ }
467
+ function bnModPowInt(e, m) {
468
+ var z;
469
+ return ((z = 256 > e || m.isEven() ? new Classic(m) : new Montgomery(m)),
470
+ this.exp(e, z));
471
+ }
472
+ function bnClone() {
473
+ var r = nbi();
474
+ return this.copyTo(r), r;
475
+ }
476
+ function bnIntValue() {
477
+ if (this.s < 0) {
478
+ if (1 == this.t)
479
+ return this[0] - this.DV;
480
+ if (0 == this.t)
481
+ return -1;
482
+ }
483
+ else {
484
+ if (1 == this.t)
485
+ return this[0];
486
+ if (0 == this.t)
487
+ return 0;
488
+ }
489
+ return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];
490
+ }
491
+ function bnByteValue() {
492
+ return 0 == this.t ? this.s : (this[0] << 24) >> 24;
493
+ }
494
+ function bnShortValue() {
495
+ return 0 == this.t ? this.s : (this[0] << 16) >> 16;
496
+ }
497
+ function bnpChunkSize(r) {
498
+ return Math.floor((Math.LN2 * this.DB) / Math.log(r));
499
+ }
500
+ function bnSigNum() {
501
+ return this.s < 0 ? -1 : this.t <= 0 || (1 == this.t && this[0] <= 0) ? 0 : 1;
502
+ }
503
+ function bnpToRadix(b) {
504
+ if ((null == b && (b = 10), 0 == this.signum() || 2 > b || b > 36))
505
+ return "0";
506
+ var cs = this.chunkSize(b), a = Math.pow(b, cs), d = nbv(a), y = nbi(), z = nbi(), r = "";
507
+ for (this.divRemTo(d, y, z); y.signum() > 0;)
508
+ (r = (a + z.intValue()).toString(b).substr(1) + r), y.divRemTo(d, y, z);
509
+ return z.intValue().toString(b) + r;
510
+ }
511
+ function bnpFromRadix(s, b) {
512
+ this.fromInt(0), null == b && (b = 10);
513
+ for (var cs = this.chunkSize(b), d = Math.pow(b, cs), mi = !1, j = 0, w = 0, i = 0; i < s.length; ++i) {
514
+ var x = intAt(s, i);
515
+ 0 > x
516
+ ? "-" == s.charAt(i) && 0 == this.signum() && (mi = !0)
517
+ : ((w = b * w + x),
518
+ ++j >= cs &&
519
+ (this.dMultiply(d), this.dAddOffset(w, 0), (j = 0), (w = 0)));
520
+ }
521
+ j > 0 && (this.dMultiply(Math.pow(b, j)), this.dAddOffset(w, 0)),
522
+ mi && BigInteger.ZERO.subTo(this, this);
523
+ }
524
+ function bnpFromNumber(a, b, c) {
525
+ if ("number" == typeof b)
526
+ if (2 > a)
527
+ this.fromInt(1);
528
+ else
529
+ for (this.fromNumber(a, c),
530
+ this.testBit(a - 1) ||
531
+ this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this),
532
+ this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(b);)
533
+ this.dAddOffset(2, 0),
534
+ this.bitLength() > a &&
535
+ this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);
536
+ else {
537
+ var x = new Array(), t = 7 & a;
538
+ (x.length = (a >> 3) + 1),
539
+ b.nextBytes(x),
540
+ t > 0 ? (x[0] &= (1 << t) - 1) : (x[0] = 0),
541
+ this.fromString(x, 256);
542
+ }
543
+ }
544
+ function bnToByteArray() {
545
+ var i = this.t, r = new Array();
546
+ r[0] = this.s;
547
+ var d, p = this.DB - ((i * this.DB) % 8), k = 0;
548
+ if (i-- > 0)
549
+ for (p < this.DB &&
550
+ (d = this[i] >> p) != (this.s & this.DM) >> p &&
551
+ (r[k++] = d | (this.s << (this.DB - p))); i >= 0;)
552
+ 8 > p
553
+ ? ((d = (this[i] & ((1 << p) - 1)) << (8 - p)),
554
+ (d |= this[--i] >> (p += this.DB - 8)))
555
+ : ((d = (this[i] >> (p -= 8)) & 255), 0 >= p && ((p += this.DB), --i)),
556
+ 0 != (128 & d) && (d |= -256),
557
+ 0 == k && (128 & this.s) != (128 & d) && ++k,
558
+ (k > 0 || d != this.s) && (r[k++] = d);
559
+ return r;
560
+ }
561
+ function bnEquals(a) {
562
+ return 0 == this.compareTo(a);
563
+ }
564
+ function bnMin(a) {
565
+ return this.compareTo(a) < 0 ? this : a;
566
+ }
567
+ function bnMax(a) {
568
+ return this.compareTo(a) > 0 ? this : a;
569
+ }
570
+ function bnpBitwiseTo(a, op, r) {
571
+ var i, f, m = Math.min(a.t, this.t);
572
+ for (i = 0; m > i; ++i)
573
+ r[i] = op(this[i], a[i]);
574
+ if (a.t < this.t) {
575
+ for (f = a.s & this.DM, i = m; i < this.t; ++i)
576
+ r[i] = op(this[i], f);
577
+ r.t = this.t;
578
+ }
579
+ else {
580
+ for (f = this.s & this.DM, i = m; i < a.t; ++i)
581
+ r[i] = op(f, a[i]);
582
+ r.t = a.t;
583
+ }
584
+ (r.s = op(this.s, a.s)), r.clamp();
585
+ }
586
+ function op_and(x, y) {
587
+ return x & y;
588
+ }
589
+ function bnAnd(a) {
590
+ var r = nbi();
591
+ return this.bitwiseTo(a, op_and, r), r;
592
+ }
593
+ function op_or(x, y) {
594
+ return x | y;
595
+ }
596
+ function bnOr(a) {
597
+ var r = nbi();
598
+ return this.bitwiseTo(a, op_or, r), r;
599
+ }
600
+ function op_xor(x, y) {
601
+ return x ^ y;
602
+ }
603
+ function bnXor(a) {
604
+ var r = nbi();
605
+ return this.bitwiseTo(a, op_xor, r), r;
606
+ }
607
+ function op_andnot(x, y) {
608
+ return x & ~y;
609
+ }
610
+ function bnAndNot(a) {
611
+ var r = nbi();
612
+ return this.bitwiseTo(a, op_andnot, r), r;
613
+ }
614
+ function bnNot() {
615
+ for (var r = nbi(), i = 0; i < this.t; ++i)
616
+ r[i] = this.DM & ~this[i];
617
+ return (r.t = this.t), (r.s = ~this.s), r;
618
+ }
619
+ function bnShiftLeft(n) {
620
+ var r = nbi();
621
+ return 0 > n ? this.rShiftTo(-n, r) : this.lShiftTo(n, r), r;
622
+ }
623
+ function bnShiftRight(n) {
624
+ var r = nbi();
625
+ return 0 > n ? this.lShiftTo(-n, r) : this.rShiftTo(n, r), r;
626
+ }
627
+ function lbit(x) {
628
+ if (0 == x)
629
+ return -1;
630
+ var r = 0;
631
+ return (0 == (65535 & x) && ((x >>= 16), (r += 16)),
632
+ 0 == (255 & x) && ((x >>= 8), (r += 8)),
633
+ 0 == (15 & x) && ((x >>= 4), (r += 4)),
634
+ 0 == (3 & x) && ((x >>= 2), (r += 2)),
635
+ 0 == (1 & x) && ++r,
636
+ r);
637
+ }
638
+ function bnGetLowestSetBit() {
639
+ for (var i = 0; i < this.t; ++i)
640
+ if (0 != this[i])
641
+ return i * this.DB + lbit(this[i]);
642
+ return this.s < 0 ? this.t * this.DB : -1;
643
+ }
644
+ function cbit(x) {
645
+ for (var r = 0; 0 != x;)
646
+ (x &= x - 1), ++r;
647
+ return r;
648
+ }
649
+ function bnBitCount() {
650
+ for (var r = 0, x = this.s & this.DM, i = 0; i < this.t; ++i)
651
+ r += cbit(this[i] ^ x);
652
+ return r;
653
+ }
654
+ function bnTestBit(n) {
655
+ var j = Math.floor(n / this.DB);
656
+ return j >= this.t ? 0 != this.s : 0 != (this[j] & (1 << n % this.DB));
657
+ }
658
+ function bnpChangeBit(n, op) {
659
+ var r = BigInteger.ONE.shiftLeft(n);
660
+ return this.bitwiseTo(r, op, r), r;
661
+ }
662
+ function bnSetBit(n) {
663
+ return this.changeBit(n, op_or);
664
+ }
665
+ function bnClearBit(n) {
666
+ return this.changeBit(n, op_andnot);
667
+ }
668
+ function bnFlipBit(n) {
669
+ return this.changeBit(n, op_xor);
670
+ }
671
+ function bnpAddTo(a, r) {
672
+ for (var i = 0, c = 0, m = Math.min(a.t, this.t); m > i;)
673
+ (c += this[i] + a[i]), (r[i++] = c & this.DM), (c >>= this.DB);
674
+ if (a.t < this.t) {
675
+ for (c += a.s; i < this.t;)
676
+ (c += this[i]), (r[i++] = c & this.DM), (c >>= this.DB);
677
+ c += this.s;
678
+ }
679
+ else {
680
+ for (c += this.s; i < a.t;)
681
+ (c += a[i]), (r[i++] = c & this.DM), (c >>= this.DB);
682
+ c += a.s;
683
+ }
684
+ (r.s = 0 > c ? -1 : 0),
685
+ c > 0 ? (r[i++] = c) : -1 > c && (r[i++] = this.DV + c),
686
+ (r.t = i),
687
+ r.clamp();
688
+ }
689
+ function bnAdd(a) {
690
+ var r = nbi();
691
+ return this.addTo(a, r), r;
692
+ }
693
+ function bnSubtract(a) {
694
+ var r = nbi();
695
+ return this.subTo(a, r), r;
696
+ }
697
+ function bnMultiply(a) {
698
+ var r = nbi();
699
+ return this.multiplyTo(a, r), r;
700
+ }
701
+ function bnDivide(a) {
702
+ var r = nbi();
703
+ return this.divRemTo(a, r, null), r;
704
+ }
705
+ function bnRemainder(a) {
706
+ var r = nbi();
707
+ return this.divRemTo(a, null, r), r;
708
+ }
709
+ function bnDivideAndRemainder(a) {
710
+ var q = nbi(), r = nbi();
711
+ return this.divRemTo(a, q, r), new Array(q, r);
712
+ }
713
+ function bnpDMultiply(n) {
714
+ (this[this.t] = this.am(0, n - 1, this, 0, 0, this.t)),
715
+ ++this.t,
716
+ this.clamp();
717
+ }
718
+ function bnpDAddOffset(n, w) {
719
+ if (0 != n) {
720
+ for (; this.t <= w;)
721
+ this[this.t++] = 0;
722
+ for (this[w] += n; this[w] >= this.DV;)
723
+ (this[w] -= this.DV), ++w >= this.t && (this[this.t++] = 0), ++this[w];
724
+ }
725
+ }
726
+ function NullExp() { }
727
+ function nNop(x) {
728
+ return x;
729
+ }
730
+ function nMulTo(x, y, r) {
731
+ x.multiplyTo(y, r);
732
+ }
733
+ function nSqrTo(x, r) {
734
+ x.squareTo(r);
735
+ }
736
+ function bnPow(e) {
737
+ return this.exp(e, new NullExp());
738
+ }
739
+ function bnpMultiplyLowerTo(a, n, r) {
740
+ var i = Math.min(this.t + a.t, n);
741
+ for (r.s = 0, r.t = i; i > 0;)
742
+ r[--i] = 0;
743
+ var j;
744
+ for (j = r.t - this.t; j > i; ++i)
745
+ r[i + this.t] = this.am(0, a[i], r, i, 0, this.t);
746
+ for (j = Math.min(a.t, n); j > i; ++i)
747
+ this.am(0, a[i], r, i, 0, n - i);
748
+ r.clamp();
749
+ }
750
+ function bnpMultiplyUpperTo(a, n, r) {
751
+ --n;
752
+ var i = (r.t = this.t + a.t - n);
753
+ for (r.s = 0; --i >= 0;)
754
+ r[i] = 0;
755
+ for (i = Math.max(n - this.t, 0); i < a.t; ++i)
756
+ r[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n);
757
+ r.clamp(), r.drShiftTo(1, r);
758
+ }
759
+ function Barrett(m) {
760
+ (this.r2 = nbi()),
761
+ (this.q3 = nbi()),
762
+ BigInteger.ONE.dlShiftTo(2 * m.t, this.r2),
763
+ (this.mu = this.r2.divide(m)),
764
+ (this.m = m);
765
+ }
766
+ function barrettConvert(x) {
767
+ if (x.s < 0 || x.t > 2 * this.m.t)
768
+ return x.mod(this.m);
769
+ if (x.compareTo(this.m) < 0)
770
+ return x;
771
+ var r = nbi();
772
+ return x.copyTo(r), this.reduce(r), r;
773
+ }
774
+ function barrettRevert(x) {
775
+ return x;
776
+ }
777
+ function barrettReduce(x) {
778
+ for (x.drShiftTo(this.m.t - 1, this.r2),
779
+ x.t > this.m.t + 1 && ((x.t = this.m.t + 1), x.clamp()),
780
+ this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3),
781
+ this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); x.compareTo(this.r2) < 0;)
782
+ x.dAddOffset(1, this.m.t + 1);
783
+ for (x.subTo(this.r2, x); x.compareTo(this.m) >= 0;)
784
+ x.subTo(this.m, x);
785
+ }
786
+ function barrettSqrTo(x, r) {
787
+ x.squareTo(r), this.reduce(r);
788
+ }
789
+ function barrettMulTo(x, y, r) {
790
+ x.multiplyTo(y, r), this.reduce(r);
791
+ }
792
+ function bnModPow(e, m) {
793
+ var k, z, i = e.bitLength(), r = nbv(1);
794
+ if (0 >= i)
795
+ return r;
796
+ (k = 18 > i ? 1 : 48 > i ? 3 : 144 > i ? 4 : 768 > i ? 5 : 6),
797
+ (z =
798
+ 8 > i ? new Classic(m) : m.isEven() ? new Barrett(m) : new Montgomery(m));
799
+ var g = new Array(), n = 3, k1 = k - 1, km = (1 << k) - 1;
800
+ if (((g[1] = z.convert(this)), k > 1)) {
801
+ var g2 = nbi();
802
+ for (z.sqrTo(g[1], g2); km >= n;)
803
+ (g[n] = nbi()), z.mulTo(g2, g[n - 2], g[n]), (n += 2);
804
+ }
805
+ var w, t, j = e.t - 1, is1 = !0, r2 = nbi();
806
+ for (i = nbits(e[j]) - 1; j >= 0;) {
807
+ for (i >= k1
808
+ ? (w = (e[j] >> (i - k1)) & km)
809
+ : ((w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i)),
810
+ j > 0 && (w |= e[j - 1] >> (this.DB + i - k1))),
811
+ n = k; 0 == (1 & w);)
812
+ (w >>= 1), --n;
813
+ if (((i -= n) < 0 && ((i += this.DB), --j), is1))
814
+ g[w].copyTo(r), (is1 = !1);
815
+ else {
816
+ for (; n > 1;)
817
+ z.sqrTo(r, r2), z.sqrTo(r2, r), (n -= 2);
818
+ n > 0 ? z.sqrTo(r, r2) : ((t = r), (r = r2), (r2 = t)),
819
+ z.mulTo(r2, g[w], r);
820
+ }
821
+ for (; j >= 0 && 0 == (e[j] & (1 << i));)
822
+ z.sqrTo(r, r2),
823
+ (t = r),
824
+ (r = r2),
825
+ (r2 = t),
826
+ --i < 0 && ((i = this.DB - 1), --j);
827
+ }
828
+ return z.revert(r);
829
+ }
830
+ function bnGCD(a) {
831
+ var x = this.s < 0 ? this.negate() : this.clone(), y = a.s < 0 ? a.negate() : a.clone();
832
+ if (x.compareTo(y) < 0) {
833
+ var t = x;
834
+ (x = y), (y = t);
835
+ }
836
+ var i = x.getLowestSetBit(), g = y.getLowestSetBit();
837
+ if (0 > g)
838
+ return x;
839
+ for (g > i && (g = i), g > 0 && (x.rShiftTo(g, x), y.rShiftTo(g, y)); x.signum() > 0;)
840
+ (i = x.getLowestSetBit()) > 0 && x.rShiftTo(i, x),
841
+ (i = y.getLowestSetBit()) > 0 && y.rShiftTo(i, y),
842
+ x.compareTo(y) >= 0
843
+ ? (x.subTo(y, x), x.rShiftTo(1, x))
844
+ : (y.subTo(x, y), y.rShiftTo(1, y));
845
+ return g > 0 && y.lShiftTo(g, y), y;
846
+ }
847
+ function bnpModInt(n) {
848
+ if (0 >= n)
849
+ return 0;
850
+ var d = this.DV % n, r = this.s < 0 ? n - 1 : 0;
851
+ if (this.t > 0)
852
+ if (0 == d)
853
+ r = this[0] % n;
854
+ else
855
+ for (var i = this.t - 1; i >= 0; --i)
856
+ r = (d * r + this[i]) % n;
857
+ return r;
858
+ }
859
+ function bnModInverse(m) {
860
+ var ac = m.isEven();
861
+ if ((this.isEven() && ac) || 0 == m.signum())
862
+ return BigInteger.ZERO;
863
+ for (var u = m.clone(), v = this.clone(), a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); 0 != u.signum();) {
864
+ for (; u.isEven();)
865
+ u.rShiftTo(1, u),
866
+ ac
867
+ ? ((a.isEven() && b.isEven()) || (a.addTo(this, a), b.subTo(m, b)),
868
+ a.rShiftTo(1, a))
869
+ : b.isEven() || b.subTo(m, b),
870
+ b.rShiftTo(1, b);
871
+ for (; v.isEven();)
872
+ v.rShiftTo(1, v),
873
+ ac
874
+ ? ((c.isEven() && d.isEven()) || (c.addTo(this, c), d.subTo(m, d)),
875
+ c.rShiftTo(1, c))
876
+ : d.isEven() || d.subTo(m, d),
877
+ d.rShiftTo(1, d);
878
+ u.compareTo(v) >= 0
879
+ ? (u.subTo(v, u), ac && a.subTo(c, a), b.subTo(d, b))
880
+ : (v.subTo(u, v), ac && c.subTo(a, c), d.subTo(b, d));
881
+ }
882
+ return 0 != v.compareTo(BigInteger.ONE)
883
+ ? BigInteger.ZERO
884
+ : d.compareTo(m) >= 0
885
+ ? d.subtract(m)
886
+ : d.signum() < 0
887
+ ? (d.addTo(m, d), d.signum() < 0 ? d.add(m) : d)
888
+ : d;
889
+ }
890
+ function bnIsProbablePrime(t) {
891
+ var i, x = this.abs();
892
+ if (1 == x.t && x[0] <= lowprimes[lowprimes.length - 1]) {
893
+ for (i = 0; i < lowprimes.length; ++i)
894
+ if (x[0] == lowprimes[i])
895
+ return !0;
896
+ return !1;
897
+ }
898
+ if (x.isEven())
899
+ return !1;
900
+ for (i = 1; i < lowprimes.length;) {
901
+ for (var m = lowprimes[i], j = i + 1; j < lowprimes.length && lplim > m;)
902
+ m *= lowprimes[j++];
903
+ for (m = x.modInt(m); j > i;)
904
+ if (m % lowprimes[i++] == 0)
905
+ return !1;
906
+ }
907
+ return x.millerRabin(t);
908
+ }
909
+ function bnpMillerRabin(t) {
910
+ var n1 = this.subtract(BigInteger.ONE), k = n1.getLowestSetBit();
911
+ if (0 >= k)
912
+ return !1;
913
+ var r = n1.shiftRight(k);
914
+ (t = (t + 1) >> 1), t > lowprimes.length && (t = lowprimes.length);
915
+ for (var a = nbi(), i = 0; t > i; ++i) {
916
+ a.fromInt(lowprimes[i]);
917
+ var y = a.modPow(r, this);
918
+ if (0 != y.compareTo(BigInteger.ONE) && 0 != y.compareTo(n1)) {
919
+ for (var j = 1; j++ < k && 0 != y.compareTo(n1);)
920
+ if (((y = y.modPowInt(2, this)), 0 == y.compareTo(BigInteger.ONE)))
921
+ return !1;
922
+ if (0 != y.compareTo(n1))
923
+ return !1;
924
+ }
925
+ }
926
+ return !0;
927
+ }
928
+ function Arcfour() {
929
+ (this.i = 0), (this.j = 0), (this.S = new Array());
930
+ }
931
+ function ARC4init(key) {
932
+ var i, j, t;
933
+ for (i = 0; 256 > i; ++i)
934
+ this.S[i] = i;
935
+ for (j = 0, i = 0; 256 > i; ++i)
936
+ (j = (j + this.S[i] + key[i % key.length]) & 255),
937
+ (t = this.S[i]),
938
+ (this.S[i] = this.S[j]),
939
+ (this.S[j] = t);
940
+ (this.i = 0), (this.j = 0);
941
+ }
942
+ function ARC4next() {
943
+ var t;
944
+ return ((this.i = (this.i + 1) & 255),
945
+ (this.j = (this.j + this.S[this.i]) & 255),
946
+ (t = this.S[this.i]),
947
+ (this.S[this.i] = this.S[this.j]),
948
+ (this.S[this.j] = t),
949
+ this.S[(t + this.S[this.i]) & 255]);
950
+ }
951
+ function prng_newstate() {
952
+ return new Arcfour();
953
+ }
954
+ function rng_seed_int(x) {
955
+ (rng_pool[rng_pptr++] ^= 255 & x),
956
+ (rng_pool[rng_pptr++] ^= (x >> 8) & 255),
957
+ (rng_pool[rng_pptr++] ^= (x >> 16) & 255),
958
+ (rng_pool[rng_pptr++] ^= (x >> 24) & 255),
959
+ rng_pptr >= rng_psize && (rng_pptr -= rng_psize);
960
+ }
961
+ function rng_seed_time() {
962
+ rng_seed_int(new Date().getTime());
963
+ }
964
+ function rng_get_byte() {
965
+ if (null == rng_state) {
966
+ for (rng_seed_time(),
967
+ rng_state = prng_newstate(),
968
+ rng_state.init(rng_pool),
969
+ rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr)
970
+ rng_pool[rng_pptr] = 0;
971
+ rng_pptr = 0;
972
+ }
973
+ return rng_state.next();
974
+ }
975
+ function rng_get_bytes(ba) {
976
+ var i;
977
+ for (i = 0; i < ba.length; ++i)
978
+ ba[i] = rng_get_byte();
979
+ }
980
+ function SecureRandom() { }
981
+ function parseBigInt(str, r) {
982
+ return new BigInteger(str, r);
983
+ }
984
+ function linebrk(s, n) {
985
+ for (var ret = "", i = 0; i + n < s.length;)
986
+ (ret += s.substring(i, i + n) + "\n"), (i += n);
987
+ return ret + s.substring(i, s.length);
988
+ }
989
+ function byte2Hex(b) {
990
+ return 16 > b ? "0" + b.toString(16) : b.toString(16);
991
+ }
992
+ function pkcs1pad2(s, n) {
993
+ if (n < s.length + 11)
994
+ return alert("Message too long for RSA"), null;
995
+ for (var ba = new Array(), i = s.length - 1; i >= 0 && n > 0;) {
996
+ var c = s.charCodeAt(i--);
997
+ 128 > c
998
+ ? (ba[--n] = c)
999
+ : c > 127 && 2048 > c
1000
+ ? ((ba[--n] = (63 & c) | 128), (ba[--n] = (c >> 6) | 192))
1001
+ : ((ba[--n] = (63 & c) | 128),
1002
+ (ba[--n] = ((c >> 6) & 63) | 128),
1003
+ (ba[--n] = (c >> 12) | 224));
1004
+ }
1005
+ ba[--n] = 0;
1006
+ for (var rng = new SecureRandom(), x = new Array(); n > 2;) {
1007
+ for (x[0] = 0; 0 == x[0];)
1008
+ rng.nextBytes(x);
1009
+ ba[--n] = x[0];
1010
+ }
1011
+ return (ba[--n] = 2), (ba[--n] = 0), new BigInteger(ba);
1012
+ }
1013
+ function RSAKey() {
1014
+ (this.n = null),
1015
+ (this.e = 0),
1016
+ (this.d = null),
1017
+ (this.p = null),
1018
+ (this.q = null),
1019
+ (this.dmp1 = null),
1020
+ (this.dmq1 = null),
1021
+ (this.coeff = null);
1022
+ }
1023
+ function RSASetPublic(N, E) {
1024
+ null != N && null != E && N.length > 0 && E.length > 0
1025
+ ? ((this.n = parseBigInt(N, 16)), (this.e = parseInt(E, 16)))
1026
+ : alert("Invalid RSA public key");
1027
+ }
1028
+ function RSADoPublic(x) {
1029
+ return x.modPowInt(this.e, this.n);
1030
+ }
1031
+ function RSAEncrypt(text) {
1032
+ var m = pkcs1pad2(text, (this.n.bitLength() + 7) >> 3);
1033
+ if (null == m)
1034
+ return null;
1035
+ var c = this.doPublic(m);
1036
+ if (null == c)
1037
+ return null;
1038
+ var h = c.toString(16);
1039
+ return 0 == (1 & h.length) ? h : "0" + h;
1040
+ }
1041
+ function pkcs1unpad2(d, n) {
1042
+ for (var b = d.toByteArray(), i = 0; i < b.length && 0 == b[i];)
1043
+ ++i;
1044
+ if (b.length - i != n - 1 || 2 != b[i])
1045
+ return null;
1046
+ for (++i; 0 != b[i];)
1047
+ if (++i >= b.length)
1048
+ return null;
1049
+ for (var ret = ""; ++i < b.length;) {
1050
+ var c = 255 & b[i];
1051
+ 128 > c
1052
+ ? (ret += String.fromCharCode(c))
1053
+ : c > 191 && 224 > c
1054
+ ? ((ret += String.fromCharCode(((31 & c) << 6) | (63 & b[i + 1]))), ++i)
1055
+ : ((ret += String.fromCharCode(((15 & c) << 12) | ((63 & b[i + 1]) << 6) | (63 & b[i + 2]))),
1056
+ (i += 2));
1057
+ }
1058
+ return ret;
1059
+ }
1060
+ function RSASetPrivate(N, E, D) {
1061
+ null != N && null != E && N.length > 0 && E.length > 0
1062
+ ? ((this.n = parseBigInt(N, 16)),
1063
+ (this.e = parseInt(E, 16)),
1064
+ (this.d = parseBigInt(D, 16)))
1065
+ : alert("Invalid RSA private key");
1066
+ }
1067
+ function RSASetPrivateEx(N, E, D, P, Q, DP, DQ, C) {
1068
+ null != N && null != E && N.length > 0 && E.length > 0
1069
+ ? ((this.n = parseBigInt(N, 16)),
1070
+ (this.e = parseInt(E, 16)),
1071
+ (this.d = parseBigInt(D, 16)),
1072
+ (this.p = parseBigInt(P, 16)),
1073
+ (this.q = parseBigInt(Q, 16)),
1074
+ (this.dmp1 = parseBigInt(DP, 16)),
1075
+ (this.dmq1 = parseBigInt(DQ, 16)),
1076
+ (this.coeff = parseBigInt(C, 16)))
1077
+ : alert("Invalid RSA private key");
1078
+ }
1079
+ function RSAGenerate(B, E) {
1080
+ var rng = new SecureRandom(), qs = B >> 1;
1081
+ this.e = parseInt(E, 16);
1082
+ for (var ee = new BigInteger(E, 16);;) {
1083
+ for (; (this.p = new BigInteger(B - qs, 1, rng)),
1084
+ 0 !=
1085
+ this.p.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) ||
1086
+ !this.p.isProbablePrime(10);)
1087
+ ;
1088
+ for (; (this.q = new BigInteger(qs, 1, rng)),
1089
+ 0 !=
1090
+ this.q.subtract(BigInteger.ONE).gcd(ee).compareTo(BigInteger.ONE) ||
1091
+ !this.q.isProbablePrime(10);)
1092
+ ;
1093
+ if (this.p.compareTo(this.q) <= 0) {
1094
+ var t = this.p;
1095
+ (this.p = this.q), (this.q = t);
1096
+ }
1097
+ var p1 = this.p.subtract(BigInteger.ONE), q1 = this.q.subtract(BigInteger.ONE), phi = p1.multiply(q1);
1098
+ if (0 == phi.gcd(ee).compareTo(BigInteger.ONE)) {
1099
+ (this.n = this.p.multiply(this.q)),
1100
+ (this.d = ee.modInverse(phi)),
1101
+ (this.dmp1 = this.d.mod(p1)),
1102
+ (this.dmq1 = this.d.mod(q1)),
1103
+ (this.coeff = this.q.modInverse(this.p));
1104
+ break;
1105
+ }
1106
+ }
1107
+ }
1108
+ function RSADoPrivate(x) {
1109
+ if (null == this.p || null == this.q)
1110
+ return x.modPow(this.d, this.n);
1111
+ for (var xp = x.mod(this.p).modPow(this.dmp1, this.p), xq = x.mod(this.q).modPow(this.dmq1, this.q); xp.compareTo(xq) < 0;)
1112
+ xp = xp.add(this.p);
1113
+ return xp
1114
+ .subtract(xq)
1115
+ .multiply(this.coeff)
1116
+ .mod(this.p)
1117
+ .multiply(this.q)
1118
+ .add(xq);
1119
+ }
1120
+ function RSADecrypt(ctext) {
1121
+ var c = parseBigInt(ctext, 16), m = this.doPrivate(c);
1122
+ return null == m ? null : pkcs1unpad2(m, (this.n.bitLength() + 7) >> 3);
1123
+ }
1124
+ var dbits, canary = 0xdeadbeefcafe, j_lm = 15715070 == (16777215 & canary);
1125
+ j_lm && "Microsoft Internet Explorer" == navigator.appName
1126
+ ? ((BigInteger.prototype.am = am2), (dbits = 30))
1127
+ : j_lm && "Netscape" != navigator.appName
1128
+ ? ((BigInteger.prototype.am = am1), (dbits = 26))
1129
+ : ((BigInteger.prototype.am = am3), (dbits = 28)),
1130
+ (BigInteger.prototype.DB = dbits),
1131
+ (BigInteger.prototype.DM = (1 << dbits) - 1),
1132
+ (BigInteger.prototype.DV = 1 << dbits);
1133
+ var BI_FP = 52;
1134
+ (BigInteger.prototype.FV = Math.pow(2, BI_FP)),
1135
+ (BigInteger.prototype.F1 = BI_FP - dbits),
1136
+ (BigInteger.prototype.F2 = 2 * dbits - BI_FP);
1137
+ var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz", BI_RC = new Array(), rr, vv;
1138
+ for (rr = "0".charCodeAt(0), vv = 0; 9 >= vv; ++vv)
1139
+ BI_RC[rr++] = vv;
1140
+ for (rr = "a".charCodeAt(0), vv = 10; 36 > vv; ++vv)
1141
+ BI_RC[rr++] = vv;
1142
+ for (rr = "A".charCodeAt(0), vv = 10; 36 > vv; ++vv)
1143
+ BI_RC[rr++] = vv;
1144
+ (Classic.prototype.convert = cConvert),
1145
+ (Classic.prototype.revert = cRevert),
1146
+ (Classic.prototype.reduce = cReduce),
1147
+ (Classic.prototype.mulTo = cMulTo),
1148
+ (Classic.prototype.sqrTo = cSqrTo),
1149
+ (Montgomery.prototype.convert = montConvert),
1150
+ (Montgomery.prototype.revert = montRevert),
1151
+ (Montgomery.prototype.reduce = montReduce),
1152
+ (Montgomery.prototype.mulTo = montMulTo),
1153
+ (Montgomery.prototype.sqrTo = montSqrTo),
1154
+ (BigInteger.prototype.copyTo = bnpCopyTo),
1155
+ (BigInteger.prototype.fromInt = bnpFromInt),
1156
+ (BigInteger.prototype.fromString = bnpFromString),
1157
+ (BigInteger.prototype.clamp = bnpClamp),
1158
+ (BigInteger.prototype.dlShiftTo = bnpDLShiftTo),
1159
+ (BigInteger.prototype.drShiftTo = bnpDRShiftTo),
1160
+ (BigInteger.prototype.lShiftTo = bnpLShiftTo),
1161
+ (BigInteger.prototype.rShiftTo = bnpRShiftTo),
1162
+ (BigInteger.prototype.subTo = bnpSubTo),
1163
+ (BigInteger.prototype.multiplyTo = bnpMultiplyTo),
1164
+ (BigInteger.prototype.squareTo = bnpSquareTo),
1165
+ (BigInteger.prototype.divRemTo = bnpDivRemTo),
1166
+ (BigInteger.prototype.invDigit = bnpInvDigit),
1167
+ (BigInteger.prototype.isEven = bnpIsEven),
1168
+ (BigInteger.prototype.exp = bnpExp),
1169
+ (BigInteger.prototype.toString = bnToString),
1170
+ (BigInteger.prototype.negate = bnNegate),
1171
+ (BigInteger.prototype.abs = bnAbs),
1172
+ (BigInteger.prototype.compareTo = bnCompareTo),
1173
+ (BigInteger.prototype.bitLength = bnBitLength),
1174
+ (BigInteger.prototype.mod = bnMod),
1175
+ (BigInteger.prototype.modPowInt = bnModPowInt),
1176
+ (BigInteger.ZERO = nbv(0)),
1177
+ (BigInteger.ONE = nbv(1)),
1178
+ (NullExp.prototype.convert = nNop),
1179
+ (NullExp.prototype.revert = nNop),
1180
+ (NullExp.prototype.mulTo = nMulTo),
1181
+ (NullExp.prototype.sqrTo = nSqrTo),
1182
+ (Barrett.prototype.convert = barrettConvert),
1183
+ (Barrett.prototype.revert = barrettRevert),
1184
+ (Barrett.prototype.reduce = barrettReduce),
1185
+ (Barrett.prototype.mulTo = barrettMulTo),
1186
+ (Barrett.prototype.sqrTo = barrettSqrTo);
1187
+ var lowprimes = [
1188
+ 2,
1189
+ 3,
1190
+ 5,
1191
+ 7,
1192
+ 11,
1193
+ 13,
1194
+ 17,
1195
+ 19,
1196
+ 23,
1197
+ 29,
1198
+ 31,
1199
+ 37,
1200
+ 41,
1201
+ 43,
1202
+ 47,
1203
+ 53,
1204
+ 59,
1205
+ 61,
1206
+ 67,
1207
+ 71,
1208
+ 73,
1209
+ 79,
1210
+ 83,
1211
+ 89,
1212
+ 97,
1213
+ 101,
1214
+ 103,
1215
+ 107,
1216
+ 109,
1217
+ 113,
1218
+ 127,
1219
+ 131,
1220
+ 137,
1221
+ 139,
1222
+ 149,
1223
+ 151,
1224
+ 157,
1225
+ 163,
1226
+ 167,
1227
+ 173,
1228
+ 179,
1229
+ 181,
1230
+ 191,
1231
+ 193,
1232
+ 197,
1233
+ 199,
1234
+ 211,
1235
+ 223,
1236
+ 227,
1237
+ 229,
1238
+ 233,
1239
+ 239,
1240
+ 241,
1241
+ 251,
1242
+ 257,
1243
+ 263,
1244
+ 269,
1245
+ 271,
1246
+ 277,
1247
+ 281,
1248
+ 283,
1249
+ 293,
1250
+ 307,
1251
+ 311,
1252
+ 313,
1253
+ 317,
1254
+ 331,
1255
+ 337,
1256
+ 347,
1257
+ 349,
1258
+ 353,
1259
+ 359,
1260
+ 367,
1261
+ 373,
1262
+ 379,
1263
+ 383,
1264
+ 389,
1265
+ 397,
1266
+ 401,
1267
+ 409,
1268
+ 419,
1269
+ 421,
1270
+ 431,
1271
+ 433,
1272
+ 439,
1273
+ 443,
1274
+ 449,
1275
+ 457,
1276
+ 461,
1277
+ 463,
1278
+ 467,
1279
+ 479,
1280
+ 487,
1281
+ 491,
1282
+ 499,
1283
+ 503,
1284
+ 509,
1285
+ ], lplim = (1 << 26) / lowprimes[lowprimes.length - 1];
1286
+ (BigInteger.prototype.chunkSize = bnpChunkSize),
1287
+ (BigInteger.prototype.toRadix = bnpToRadix),
1288
+ (BigInteger.prototype.fromRadix = bnpFromRadix),
1289
+ (BigInteger.prototype.fromNumber = bnpFromNumber),
1290
+ (BigInteger.prototype.bitwiseTo = bnpBitwiseTo),
1291
+ (BigInteger.prototype.changeBit = bnpChangeBit),
1292
+ (BigInteger.prototype.addTo = bnpAddTo),
1293
+ (BigInteger.prototype.dMultiply = bnpDMultiply),
1294
+ (BigInteger.prototype.dAddOffset = bnpDAddOffset),
1295
+ (BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo),
1296
+ (BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo),
1297
+ (BigInteger.prototype.modInt = bnpModInt),
1298
+ (BigInteger.prototype.millerRabin = bnpMillerRabin),
1299
+ (BigInteger.prototype.clone = bnClone),
1300
+ (BigInteger.prototype.intValue = bnIntValue),
1301
+ (BigInteger.prototype.byteValue = bnByteValue),
1302
+ (BigInteger.prototype.shortValue = bnShortValue),
1303
+ (BigInteger.prototype.signum = bnSigNum),
1304
+ (BigInteger.prototype.toByteArray = bnToByteArray),
1305
+ (BigInteger.prototype.equals = bnEquals),
1306
+ (BigInteger.prototype.min = bnMin),
1307
+ (BigInteger.prototype.max = bnMax),
1308
+ (BigInteger.prototype.and = bnAnd),
1309
+ (BigInteger.prototype.or = bnOr),
1310
+ (BigInteger.prototype.xor = bnXor),
1311
+ (BigInteger.prototype.andNot = bnAndNot),
1312
+ (BigInteger.prototype.not = bnNot),
1313
+ (BigInteger.prototype.shiftLeft = bnShiftLeft),
1314
+ (BigInteger.prototype.shiftRight = bnShiftRight),
1315
+ (BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit),
1316
+ (BigInteger.prototype.bitCount = bnBitCount),
1317
+ (BigInteger.prototype.testBit = bnTestBit),
1318
+ (BigInteger.prototype.setBit = bnSetBit),
1319
+ (BigInteger.prototype.clearBit = bnClearBit),
1320
+ (BigInteger.prototype.flipBit = bnFlipBit),
1321
+ (BigInteger.prototype.add = bnAdd),
1322
+ (BigInteger.prototype.subtract = bnSubtract),
1323
+ (BigInteger.prototype.multiply = bnMultiply),
1324
+ (BigInteger.prototype.divide = bnDivide),
1325
+ (BigInteger.prototype.remainder = bnRemainder),
1326
+ (BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder),
1327
+ (BigInteger.prototype.modPow = bnModPow),
1328
+ (BigInteger.prototype.modInverse = bnModInverse),
1329
+ (BigInteger.prototype.pow = bnPow),
1330
+ (BigInteger.prototype.gcd = bnGCD),
1331
+ (BigInteger.prototype.isProbablePrime = bnIsProbablePrime),
1332
+ (Arcfour.prototype.init = ARC4init),
1333
+ (Arcfour.prototype.next = ARC4next);
1334
+ var rng_psize = 256, rng_state, rng_pool, rng_pptr;
1335
+ if (null == rng_pool) {
1336
+ (rng_pool = new Array()), (rng_pptr = 0);
1337
+ var t;
1338
+ if ("Netscape" == navigator.appName &&
1339
+ navigator.appVersion < "5" &&
1340
+ window.crypto) {
1341
+ var z = window.crypto.random(32);
1342
+ for (t = 0; t < z.length; ++t)
1343
+ rng_pool[rng_pptr++] = 255 & z.charCodeAt(t);
1344
+ }
1345
+ for (; rng_psize > rng_pptr;)
1346
+ (t = Math.floor(65536 * Math.random())),
1347
+ (rng_pool[rng_pptr++] = t >>> 8),
1348
+ (rng_pool[rng_pptr++] = 255 & t);
1349
+ (rng_pptr = 0), rng_seed_time();
1350
+ }
1351
+ (SecureRandom.prototype.nextBytes = rng_get_bytes),
1352
+ (RSAKey.prototype.doPublic = RSADoPublic),
1353
+ (RSAKey.prototype.setPublic = RSASetPublic),
1354
+ (RSAKey.prototype.encrypt = RSAEncrypt),
1355
+ (RSAKey.prototype.doPrivate = RSADoPrivate),
1356
+ (RSAKey.prototype.setPrivate = RSASetPrivate),
1357
+ (RSAKey.prototype.setPrivateEx = RSASetPrivateEx),
1358
+ (RSAKey.prototype.generate = RSAGenerate),
1359
+ (RSAKey.prototype.decrypt = RSADecrypt);
1360
+ var CryptoJS = CryptoJS ||
1361
+ (function (u, p) {
1362
+ var d = {}, l = (d.lib = {}), s = function () { }, t = (l.Base = {
1363
+ extend: function (a) {
1364
+ s.prototype = this;
1365
+ var c = new s();
1366
+ return (a && c.mixIn(a),
1367
+ c.hasOwnProperty("init") ||
1368
+ (c.init = function () {
1369
+ c.$super.init.apply(this, arguments);
1370
+ }),
1371
+ (c.init.prototype = c),
1372
+ (c.$super = this),
1373
+ c);
1374
+ },
1375
+ create: function () {
1376
+ var a = this.extend();
1377
+ return a.init.apply(a, arguments), a;
1378
+ },
1379
+ init: function () { },
1380
+ mixIn: function (a) {
1381
+ for (var c in a)
1382
+ a.hasOwnProperty(c) && (this[c] = a[c]);
1383
+ a.hasOwnProperty("toString") && (this.toString = a.toString);
1384
+ },
1385
+ clone: function () {
1386
+ return this.init.prototype.extend(this);
1387
+ },
1388
+ }), r = (l.WordArray = t.extend({
1389
+ init: function (a, c) {
1390
+ (a = this.words = a || []),
1391
+ (this.sigBytes = c != p ? c : 4 * a.length);
1392
+ },
1393
+ toString: function (a) {
1394
+ return (a || v).stringify(this);
1395
+ },
1396
+ concat: function (a) {
1397
+ var c = this.words, e = a.words, j = this.sigBytes;
1398
+ if (((a = a.sigBytes), this.clamp(), j % 4))
1399
+ for (var k = 0; a > k; k++)
1400
+ c[(j + k) >>> 2] |=
1401
+ ((e[k >>> 2] >>> (24 - 8 * (k % 4))) & 255) <<
1402
+ (24 - 8 * ((j + k) % 4));
1403
+ else if (65535 < e.length)
1404
+ for (k = 0; a > k; k += 4)
1405
+ c[(j + k) >>> 2] = e[k >>> 2];
1406
+ else
1407
+ c.push.apply(c, e);
1408
+ return (this.sigBytes += a), this;
1409
+ },
1410
+ clamp: function () {
1411
+ var a = this.words, c = this.sigBytes;
1412
+ (a[c >>> 2] &= 4294967295 << (32 - 8 * (c % 4))),
1413
+ (a.length = u.ceil(c / 4));
1414
+ },
1415
+ clone: function () {
1416
+ var a = t.clone.call(this);
1417
+ return (a.words = this.words.slice(0)), a;
1418
+ },
1419
+ random: function (a) {
1420
+ for (var c = [], e = 0; a > e; e += 4)
1421
+ c.push((4294967296 * u.random()) | 0);
1422
+ return new r.init(c, a);
1423
+ },
1424
+ })), w = (d.enc = {}), v = (w.Hex = {
1425
+ stringify: function (a) {
1426
+ var c = a.words;
1427
+ a = a.sigBytes;
1428
+ for (var e = [], j = 0; a > j; j++) {
1429
+ var k = (c[j >>> 2] >>> (24 - 8 * (j % 4))) & 255;
1430
+ e.push((k >>> 4).toString(16)), e.push((15 & k).toString(16));
1431
+ }
1432
+ return e.join("");
1433
+ },
1434
+ parse: function (a) {
1435
+ for (var c = a.length, e = [], j = 0; c > j; j += 2)
1436
+ e[j >>> 3] |= parseInt(a.substr(j, 2), 16) << (24 - 4 * (j % 8));
1437
+ return new r.init(e, c / 2);
1438
+ },
1439
+ }), b = (w.Latin1 = {
1440
+ stringify: function (a) {
1441
+ var c = a.words;
1442
+ a = a.sigBytes;
1443
+ for (var e = [], j = 0; a > j; j++)
1444
+ e.push(String.fromCharCode((c[j >>> 2] >>> (24 - 8 * (j % 4))) & 255));
1445
+ return e.join("");
1446
+ },
1447
+ parse: function (a) {
1448
+ for (var c = a.length, e = [], j = 0; c > j; j++)
1449
+ e[j >>> 2] |= (255 & a.charCodeAt(j)) << (24 - 8 * (j % 4));
1450
+ return new r.init(e, c);
1451
+ },
1452
+ }), x = (w.Utf8 = {
1453
+ stringify: function (a) {
1454
+ try {
1455
+ return decodeURIComponent(escape(b.stringify(a)));
1456
+ }
1457
+ catch (c) {
1458
+ throw Error("Malformed UTF-8 data");
1459
+ }
1460
+ },
1461
+ parse: function (a) {
1462
+ return b.parse(unescape(encodeURIComponent(a)));
1463
+ },
1464
+ }), q = (l.BufferedBlockAlgorithm = t.extend({
1465
+ reset: function () {
1466
+ (this._data = new r.init()), (this._nDataBytes = 0);
1467
+ },
1468
+ _append: function (a) {
1469
+ "string" == typeof a && (a = x.parse(a)),
1470
+ this._data.concat(a),
1471
+ (this._nDataBytes += a.sigBytes);
1472
+ },
1473
+ _process: function (a) {
1474
+ var c = this._data, e = c.words, j = c.sigBytes, k = this.blockSize, b = j / (4 * k), b = a ? u.ceil(b) : u.max((0 | b) - this._minBufferSize, 0);
1475
+ if (((a = b * k), (j = u.min(4 * a, j)), a)) {
1476
+ for (var q = 0; a > q; q += k)
1477
+ this._doProcessBlock(e, q);
1478
+ (q = e.splice(0, a)), (c.sigBytes -= j);
1479
+ }
1480
+ return new r.init(q, j);
1481
+ },
1482
+ clone: function () {
1483
+ var a = t.clone.call(this);
1484
+ return (a._data = this._data.clone()), a;
1485
+ },
1486
+ _minBufferSize: 0,
1487
+ }));
1488
+ l.Hasher = q.extend({
1489
+ cfg: t.extend(),
1490
+ init: function (a) {
1491
+ (this.cfg = this.cfg.extend(a)), this.reset();
1492
+ },
1493
+ reset: function () {
1494
+ q.reset.call(this), this._doReset();
1495
+ },
1496
+ update: function (a) {
1497
+ return this._append(a), this._process(), this;
1498
+ },
1499
+ finalize: function (a) {
1500
+ return a && this._append(a), this._doFinalize();
1501
+ },
1502
+ blockSize: 16,
1503
+ _createHelper: function (a) {
1504
+ return function (b, e) {
1505
+ return new a.init(e).finalize(b);
1506
+ };
1507
+ },
1508
+ _createHmacHelper: function (a) {
1509
+ return function (b, e) {
1510
+ return new n.HMAC.init(a, e).finalize(b);
1511
+ };
1512
+ },
1513
+ });
1514
+ var n = (d.algo = {});
1515
+ return d;
1516
+ })(Math);
1517
+ !(function () {
1518
+ var u = CryptoJS, p = u.lib.WordArray;
1519
+ u.enc.Base64 = {
1520
+ stringify: function (d) {
1521
+ var l = d.words, p = d.sigBytes, t = this._map;
1522
+ d.clamp(), (d = []);
1523
+ for (var r = 0; p > r; r += 3)
1524
+ for (var w = (((l[r >>> 2] >>> (24 - 8 * (r % 4))) & 255) << 16) |
1525
+ (((l[(r + 1) >>> 2] >>> (24 - 8 * ((r + 1) % 4))) & 255) << 8) |
1526
+ ((l[(r + 2) >>> 2] >>> (24 - 8 * ((r + 2) % 4))) & 255), v = 0; 4 > v && p > r + 0.75 * v; v++)
1527
+ d.push(t.charAt((w >>> (6 * (3 - v))) & 63));
1528
+ if ((l = t.charAt(64)))
1529
+ for (; d.length % 4;)
1530
+ d.push(l);
1531
+ return d.join("");
1532
+ },
1533
+ parse: function (d) {
1534
+ var l = d.length, s = this._map, t = s.charAt(64);
1535
+ t && ((t = d.indexOf(t)), -1 != t && (l = t));
1536
+ for (var t = [], r = 0, w = 0; l > w; w++)
1537
+ if (w % 4) {
1538
+ var v = s.indexOf(d.charAt(w - 1)) << (2 * (w % 4)), b = s.indexOf(d.charAt(w)) >>> (6 - 2 * (w % 4));
1539
+ (t[r >>> 2] |= (v | b) << (24 - 8 * (r % 4))), r++;
1540
+ }
1541
+ return p.create(t, r);
1542
+ },
1543
+ _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
1544
+ };
1545
+ })(),
1546
+ (function (u) {
1547
+ function p(b, n, a, c, e, j, k) {
1548
+ return ((b = b + ((n & a) | (~n & c)) + e + k),
1549
+ ((b << j) | (b >>> (32 - j))) + n);
1550
+ }
1551
+ function d(b, n, a, c, e, j, k) {
1552
+ return ((b = b + ((n & c) | (a & ~c)) + e + k),
1553
+ ((b << j) | (b >>> (32 - j))) + n);
1554
+ }
1555
+ function l(b, n, a, c, e, j, k) {
1556
+ return (b = b + (n ^ a ^ c) + e + k), ((b << j) | (b >>> (32 - j))) + n;
1557
+ }
1558
+ function s(b, n, a, c, e, j, k) {
1559
+ return ((b = b + (a ^ (n | ~c)) + e + k), ((b << j) | (b >>> (32 - j))) + n);
1560
+ }
1561
+ for (var t = CryptoJS, r = t.lib, w = r.WordArray, v = r.Hasher, r = t.algo, b = [], x = 0; 64 > x; x++)
1562
+ b[x] = (4294967296 * u.abs(u.sin(x + 1))) | 0;
1563
+ (r = r.MD5 = v.extend({
1564
+ _doReset: function () {
1565
+ this._hash = new w.init([
1566
+ 1732584193,
1567
+ 4023233417,
1568
+ 2562383102,
1569
+ 271733878,
1570
+ ]);
1571
+ },
1572
+ _doProcessBlock: function (q, n) {
1573
+ for (var a = 0; 16 > a; a++) {
1574
+ var c = n + a, e = q[c];
1575
+ q[c] =
1576
+ (16711935 & ((e << 8) | (e >>> 24))) |
1577
+ (4278255360 & ((e << 24) | (e >>> 8)));
1578
+ }
1579
+ var a = this._hash.words, c = q[n + 0], e = q[n + 1], j = q[n + 2], k = q[n + 3], z = q[n + 4], r = q[n + 5], t = q[n + 6], w = q[n + 7], v = q[n + 8], A = q[n + 9], B = q[n + 10], C = q[n + 11], u = q[n + 12], D = q[n + 13], E = q[n + 14], x = q[n + 15], f = a[0], m = a[1], g = a[2], h = a[3], f = p(f, m, g, h, c, 7, b[0]), h = p(h, f, m, g, e, 12, b[1]), g = p(g, h, f, m, j, 17, b[2]), m = p(m, g, h, f, k, 22, b[3]), f = p(f, m, g, h, z, 7, b[4]), h = p(h, f, m, g, r, 12, b[5]), g = p(g, h, f, m, t, 17, b[6]), m = p(m, g, h, f, w, 22, b[7]), f = p(f, m, g, h, v, 7, b[8]), h = p(h, f, m, g, A, 12, b[9]), g = p(g, h, f, m, B, 17, b[10]), m = p(m, g, h, f, C, 22, b[11]), f = p(f, m, g, h, u, 7, b[12]), h = p(h, f, m, g, D, 12, b[13]), g = p(g, h, f, m, E, 17, b[14]), m = p(m, g, h, f, x, 22, b[15]), f = d(f, m, g, h, e, 5, b[16]), h = d(h, f, m, g, t, 9, b[17]), g = d(g, h, f, m, C, 14, b[18]), m = d(m, g, h, f, c, 20, b[19]), f = d(f, m, g, h, r, 5, b[20]), h = d(h, f, m, g, B, 9, b[21]), g = d(g, h, f, m, x, 14, b[22]), m = d(m, g, h, f, z, 20, b[23]), f = d(f, m, g, h, A, 5, b[24]), h = d(h, f, m, g, E, 9, b[25]), g = d(g, h, f, m, k, 14, b[26]), m = d(m, g, h, f, v, 20, b[27]), f = d(f, m, g, h, D, 5, b[28]), h = d(h, f, m, g, j, 9, b[29]), g = d(g, h, f, m, w, 14, b[30]), m = d(m, g, h, f, u, 20, b[31]), f = l(f, m, g, h, r, 4, b[32]), h = l(h, f, m, g, v, 11, b[33]), g = l(g, h, f, m, C, 16, b[34]), m = l(m, g, h, f, E, 23, b[35]), f = l(f, m, g, h, e, 4, b[36]), h = l(h, f, m, g, z, 11, b[37]), g = l(g, h, f, m, w, 16, b[38]), m = l(m, g, h, f, B, 23, b[39]), f = l(f, m, g, h, D, 4, b[40]), h = l(h, f, m, g, c, 11, b[41]), g = l(g, h, f, m, k, 16, b[42]), m = l(m, g, h, f, t, 23, b[43]), f = l(f, m, g, h, A, 4, b[44]), h = l(h, f, m, g, u, 11, b[45]), g = l(g, h, f, m, x, 16, b[46]), m = l(m, g, h, f, j, 23, b[47]), f = s(f, m, g, h, c, 6, b[48]), h = s(h, f, m, g, w, 10, b[49]), g = s(g, h, f, m, E, 15, b[50]), m = s(m, g, h, f, r, 21, b[51]), f = s(f, m, g, h, u, 6, b[52]), h = s(h, f, m, g, k, 10, b[53]), g = s(g, h, f, m, B, 15, b[54]), m = s(m, g, h, f, e, 21, b[55]), f = s(f, m, g, h, v, 6, b[56]), h = s(h, f, m, g, x, 10, b[57]), g = s(g, h, f, m, t, 15, b[58]), m = s(m, g, h, f, D, 21, b[59]), f = s(f, m, g, h, z, 6, b[60]), h = s(h, f, m, g, C, 10, b[61]), g = s(g, h, f, m, j, 15, b[62]), m = s(m, g, h, f, A, 21, b[63]);
1580
+ (a[0] = (a[0] + f) | 0),
1581
+ (a[1] = (a[1] + m) | 0),
1582
+ (a[2] = (a[2] + g) | 0),
1583
+ (a[3] = (a[3] + h) | 0);
1584
+ },
1585
+ _doFinalize: function () {
1586
+ var b = this._data, n = b.words, a = 8 * this._nDataBytes, c = 8 * b.sigBytes;
1587
+ n[c >>> 5] |= 128 << (24 - (c % 32));
1588
+ var e = u.floor(a / 4294967296);
1589
+ for (n[(((c + 64) >>> 9) << 4) + 15] =
1590
+ (16711935 & ((e << 8) | (e >>> 24))) |
1591
+ (4278255360 & ((e << 24) | (e >>> 8))),
1592
+ n[(((c + 64) >>> 9) << 4) + 14] =
1593
+ (16711935 & ((a << 8) | (a >>> 24))) |
1594
+ (4278255360 & ((a << 24) | (a >>> 8))),
1595
+ b.sigBytes = 4 * (n.length + 1),
1596
+ this._process(),
1597
+ b = this._hash,
1598
+ n = b.words,
1599
+ a = 0; 4 > a; a++)
1600
+ (c = n[a]),
1601
+ (n[a] =
1602
+ (16711935 & ((c << 8) | (c >>> 24))) |
1603
+ (4278255360 & ((c << 24) | (c >>> 8))));
1604
+ return b;
1605
+ },
1606
+ clone: function () {
1607
+ var b = v.clone.call(this);
1608
+ return (b._hash = this._hash.clone()), b;
1609
+ },
1610
+ })),
1611
+ (t.MD5 = v._createHelper(r)),
1612
+ (t.HmacMD5 = v._createHmacHelper(r));
1613
+ })(Math),
1614
+ (function () {
1615
+ var u = CryptoJS, p = u.lib, d = p.Base, l = p.WordArray, p = u.algo, s = (p.EvpKDF = d.extend({
1616
+ cfg: d.extend({ keySize: 4, hasher: p.MD5, iterations: 1 }),
1617
+ init: function (d) {
1618
+ this.cfg = this.cfg.extend(d);
1619
+ },
1620
+ compute: function (d, r) {
1621
+ for (var p = this.cfg, s = p.hasher.create(), b = l.create(), u = b.words, q = p.keySize, p = p.iterations; u.length < q;) {
1622
+ n && s.update(n);
1623
+ var n = s.update(d).finalize(r);
1624
+ s.reset();
1625
+ for (var a = 1; p > a; a++)
1626
+ (n = s.finalize(n)), s.reset();
1627
+ b.concat(n);
1628
+ }
1629
+ return (b.sigBytes = 4 * q), b;
1630
+ },
1631
+ }));
1632
+ u.EvpKDF = function (d, l, p) {
1633
+ return s.create(p).compute(d, l);
1634
+ };
1635
+ })(),
1636
+ CryptoJS.lib.Cipher ||
1637
+ (function (u) {
1638
+ var p = CryptoJS, d = p.lib, l = d.Base, s = d.WordArray, t = d.BufferedBlockAlgorithm, r = p.enc.Base64, w = p.algo.EvpKDF, v = (d.Cipher = t.extend({
1639
+ cfg: l.extend(),
1640
+ createEncryptor: function (e, a) {
1641
+ return this.create(this._ENC_XFORM_MODE, e, a);
1642
+ },
1643
+ createDecryptor: function (e, a) {
1644
+ return this.create(this._DEC_XFORM_MODE, e, a);
1645
+ },
1646
+ init: function (e, a, b) {
1647
+ (this.cfg = this.cfg.extend(b)),
1648
+ (this._xformMode = e),
1649
+ (this._key = a),
1650
+ this.reset();
1651
+ },
1652
+ reset: function () {
1653
+ t.reset.call(this), this._doReset();
1654
+ },
1655
+ process: function (e) {
1656
+ return this._append(e), this._process();
1657
+ },
1658
+ finalize: function (e) {
1659
+ return e && this._append(e), this._doFinalize();
1660
+ },
1661
+ keySize: 4,
1662
+ ivSize: 4,
1663
+ _ENC_XFORM_MODE: 1,
1664
+ _DEC_XFORM_MODE: 2,
1665
+ _createHelper: function (e) {
1666
+ return {
1667
+ encrypt: function (b, k, d) {
1668
+ return ("string" == typeof k ? c : a).encrypt(e, b, k, d);
1669
+ },
1670
+ decrypt: function (b, k, d) {
1671
+ console.log(c);
1672
+ return ("string" == typeof k ? c : a).decrypt(e, b, k, d);
1673
+ },
1674
+ };
1675
+ },
1676
+ }));
1677
+ d.StreamCipher = v.extend({
1678
+ _doFinalize: function () {
1679
+ return this._process(!0);
1680
+ },
1681
+ blockSize: 1,
1682
+ });
1683
+ var b = (p.mode = {}), x = function (e, a, b) {
1684
+ var c = this._iv;
1685
+ c ? (this._iv = u) : (c = this._prevBlock);
1686
+ for (var d = 0; b > d; d++)
1687
+ e[a + d] ^= c[d];
1688
+ }, q = (d.BlockCipherMode = l.extend({
1689
+ createEncryptor: function (e, a) {
1690
+ return this.Encryptor.create(e, a);
1691
+ },
1692
+ createDecryptor: function (e, a) {
1693
+ return this.Decryptor.create(e, a);
1694
+ },
1695
+ init: function (e, a) {
1696
+ (this._cipher = e), (this._iv = a);
1697
+ },
1698
+ })).extend();
1699
+ (q.Encryptor = q.extend({
1700
+ processBlock: function (e, a) {
1701
+ var b = this._cipher, c = b.blockSize;
1702
+ x.call(this, e, a, c),
1703
+ b.encryptBlock(e, a),
1704
+ (this._prevBlock = e.slice(a, a + c));
1705
+ },
1706
+ })),
1707
+ (q.Decryptor = q.extend({
1708
+ processBlock: function (e, a) {
1709
+ var b = this._cipher, c = b.blockSize, d = e.slice(a, a + c);
1710
+ b.decryptBlock(e, a), x.call(this, e, a, c), (this._prevBlock = d);
1711
+ },
1712
+ })),
1713
+ (b = b.CBC = q),
1714
+ (q = (p.pad = {}).Pkcs7 = {
1715
+ pad: function (a, b) {
1716
+ for (var c = 4 * b, c = c - (a.sigBytes % c), d = (c << 24) | (c << 16) | (c << 8) | c, l = [], n = 0; c > n; n += 4)
1717
+ l.push(d);
1718
+ (c = s.create(l, c)), a.concat(c);
1719
+ },
1720
+ unpad: function (a) {
1721
+ a.sigBytes -= 255 & a.words[(a.sigBytes - 1) >>> 2];
1722
+ },
1723
+ }),
1724
+ (d.BlockCipher = v.extend({
1725
+ cfg: v.cfg.extend({ mode: b, padding: q }),
1726
+ reset: function () {
1727
+ v.reset.call(this);
1728
+ var a = this.cfg, b = a.iv, a = a.mode;
1729
+ if (this._xformMode == this._ENC_XFORM_MODE)
1730
+ var c = a.createEncryptor;
1731
+ else
1732
+ (c = a.createDecryptor), (this._minBufferSize = 1);
1733
+ this._mode = c.call(a, this, b && b.words);
1734
+ },
1735
+ _doProcessBlock: function (a, b) {
1736
+ this._mode.processBlock(a, b);
1737
+ },
1738
+ _doFinalize: function () {
1739
+ var a = this.cfg.padding;
1740
+ if (this._xformMode == this._ENC_XFORM_MODE) {
1741
+ a.pad(this._data, this.blockSize);
1742
+ var b = this._process(!0);
1743
+ }
1744
+ else
1745
+ (b = this._process(!0)), a.unpad(b);
1746
+ return b;
1747
+ },
1748
+ blockSize: 4,
1749
+ }));
1750
+ var n = (d.CipherParams = l.extend({
1751
+ init: function (a) {
1752
+ this.mixIn(a);
1753
+ },
1754
+ toString: function (a) {
1755
+ return (a || this.formatter).stringify(this);
1756
+ },
1757
+ })), b = ((p.format = {}).OpenSSL = {
1758
+ stringify: function (a) {
1759
+ var b = a.ciphertext;
1760
+ return ((a = a.salt),
1761
+ (a
1762
+ ? s.create([1398893684, 1701076831]).concat(a).concat(b)
1763
+ : b).toString(r));
1764
+ },
1765
+ parse: function (a) {
1766
+ a = r.parse(a);
1767
+ var b = a.words;
1768
+ if (1398893684 == b[0] && 1701076831 == b[1]) {
1769
+ var c = s.create(b.slice(2, 4));
1770
+ b.splice(0, 4), (a.sigBytes -= 16);
1771
+ }
1772
+ return n.create({ ciphertext: a, salt: c });
1773
+ },
1774
+ }), a = (d.SerializableCipher = l.extend({
1775
+ cfg: l.extend({ format: b }),
1776
+ encrypt: function (a, b, c, d) {
1777
+ d = this.cfg.extend(d);
1778
+ var l = a.createEncryptor(c, d);
1779
+ return ((b = l.finalize(b)),
1780
+ (l = l.cfg),
1781
+ n.create({
1782
+ ciphertext: b,
1783
+ key: c,
1784
+ iv: l.iv,
1785
+ algorithm: a,
1786
+ mode: l.mode,
1787
+ padding: l.padding,
1788
+ blockSize: a.blockSize,
1789
+ formatter: d.format,
1790
+ }));
1791
+ },
1792
+ decrypt: function (a, b, c, d) {
1793
+ return ((d = this.cfg.extend(d)),
1794
+ (b = this._parse(b, d.format)),
1795
+ a.createDecryptor(c, d).finalize(b.ciphertext));
1796
+ },
1797
+ _parse: function (a, b) {
1798
+ return "string" == typeof a ? b.parse(a, this) : a;
1799
+ },
1800
+ })), p = ((p.kdf = {}).OpenSSL = {
1801
+ execute: function (a, b, c, d) {
1802
+ return (d || (d = s.random(8)),
1803
+ (a = w.create({ keySize: b + c }).compute(a, d)),
1804
+ (c = s.create(a.words.slice(b), 4 * c)),
1805
+ (a.sigBytes = 4 * b),
1806
+ n.create({ key: a, iv: c, salt: d }));
1807
+ },
1808
+ }), c = (d.PasswordBasedCipher = a.extend({
1809
+ cfg: a.cfg.extend({ kdf: p }),
1810
+ encrypt: function (b, c, d, l) {
1811
+ return ((l = this.cfg.extend(l)),
1812
+ (d = l.kdf.execute(d, b.keySize, b.ivSize)),
1813
+ (l.iv = d.iv),
1814
+ (b = a.encrypt.call(this, b, c, d.key, l)),
1815
+ b.mixIn(d),
1816
+ b);
1817
+ },
1818
+ decrypt: function (b, c, d, l) {
1819
+ return ((l = this.cfg.extend(l)),
1820
+ (c = this._parse(c, l.format)),
1821
+ (d = l.kdf.execute(d, b.keySize, b.ivSize, c.salt)),
1822
+ (l.iv = d.iv),
1823
+ a.decrypt.call(this, b, c, d.key, l));
1824
+ },
1825
+ }));
1826
+ })(),
1827
+ (function () {
1828
+ for (var u = CryptoJS, p = u.lib.BlockCipher, d = u.algo, l = [], s = [], t = [], r = [], w = [], v = [], b = [], x = [], q = [], n = [], a = [], c = 0; 256 > c; c++)
1829
+ a[c] = 128 > c ? c << 1 : (c << 1) ^ 283;
1830
+ for (var e = 0, j = 0, c = 0; 256 > c; c++) {
1831
+ var k = j ^ (j << 1) ^ (j << 2) ^ (j << 3) ^ (j << 4), k = (k >>> 8) ^ (255 & k) ^ 99;
1832
+ (l[e] = k), (s[k] = e);
1833
+ var z = a[e], F = a[z], G = a[F], y = (257 * a[k]) ^ (16843008 * k);
1834
+ (t[e] = (y << 24) | (y >>> 8)),
1835
+ (r[e] = (y << 16) | (y >>> 16)),
1836
+ (w[e] = (y << 8) | (y >>> 24)),
1837
+ (v[e] = y),
1838
+ (y = (16843009 * G) ^ (65537 * F) ^ (257 * z) ^ (16843008 * e)),
1839
+ (b[k] = (y << 24) | (y >>> 8)),
1840
+ (x[k] = (y << 16) | (y >>> 16)),
1841
+ (q[k] = (y << 8) | (y >>> 24)),
1842
+ (n[k] = y),
1843
+ e ? ((e = z ^ a[a[a[G ^ z]]]), (j ^= a[a[j]])) : (e = j = 1);
1844
+ }
1845
+ var H = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], d = (d.AES = p.extend({
1846
+ _doReset: function () {
1847
+ for (var a = this._key, c = a.words, d = a.sigBytes / 4, a = 4 * ((this._nRounds = d + 6) + 1), e = (this._keySchedule = []), j = 0; a > j; j++)
1848
+ if (d > j)
1849
+ e[j] = c[j];
1850
+ else {
1851
+ var k = e[j - 1];
1852
+ j % d
1853
+ ? d > 6 &&
1854
+ 4 == j % d &&
1855
+ (k =
1856
+ (l[k >>> 24] << 24) |
1857
+ (l[(k >>> 16) & 255] << 16) |
1858
+ (l[(k >>> 8) & 255] << 8) |
1859
+ l[255 & k])
1860
+ : ((k = (k << 8) | (k >>> 24)),
1861
+ (k =
1862
+ (l[k >>> 24] << 24) |
1863
+ (l[(k >>> 16) & 255] << 16) |
1864
+ (l[(k >>> 8) & 255] << 8) |
1865
+ l[255 & k]),
1866
+ (k ^= H[(j / d) | 0] << 24)),
1867
+ (e[j] = e[j - d] ^ k);
1868
+ }
1869
+ for (c = this._invKeySchedule = [], d = 0; a > d; d++)
1870
+ (j = a - d),
1871
+ (k = d % 4 ? e[j] : e[j - 4]),
1872
+ (c[d] =
1873
+ 4 > d || 4 >= j
1874
+ ? k
1875
+ : b[l[k >>> 24]] ^
1876
+ x[l[(k >>> 16) & 255]] ^
1877
+ q[l[(k >>> 8) & 255]] ^
1878
+ n[l[255 & k]]);
1879
+ },
1880
+ encryptBlock: function (a, b) {
1881
+ this._doCryptBlock(a, b, this._keySchedule, t, r, w, v, l);
1882
+ },
1883
+ decryptBlock: function (a, c) {
1884
+ var d = a[c + 1];
1885
+ (a[c + 1] = a[c + 3]),
1886
+ (a[c + 3] = d),
1887
+ this._doCryptBlock(a, c, this._invKeySchedule, b, x, q, n, s),
1888
+ (d = a[c + 1]),
1889
+ (a[c + 1] = a[c + 3]),
1890
+ (a[c + 3] = d);
1891
+ },
1892
+ _doCryptBlock: function (a, b, c, d, e, j, l, f) {
1893
+ for (var m = this._nRounds, g = a[b] ^ c[0], h = a[b + 1] ^ c[1], k = a[b + 2] ^ c[2], n = a[b + 3] ^ c[3], p = 4, r = 1; m > r; r++)
1894
+ var q = d[g >>> 24] ^
1895
+ e[(h >>> 16) & 255] ^
1896
+ j[(k >>> 8) & 255] ^
1897
+ l[255 & n] ^
1898
+ c[p++], s = d[h >>> 24] ^
1899
+ e[(k >>> 16) & 255] ^
1900
+ j[(n >>> 8) & 255] ^
1901
+ l[255 & g] ^
1902
+ c[p++], t = d[k >>> 24] ^
1903
+ e[(n >>> 16) & 255] ^
1904
+ j[(g >>> 8) & 255] ^
1905
+ l[255 & h] ^
1906
+ c[p++], n = d[n >>> 24] ^
1907
+ e[(g >>> 16) & 255] ^
1908
+ j[(h >>> 8) & 255] ^
1909
+ l[255 & k] ^
1910
+ c[p++], g = q, h = s, k = t;
1911
+ (q =
1912
+ ((f[g >>> 24] << 24) |
1913
+ (f[(h >>> 16) & 255] << 16) |
1914
+ (f[(k >>> 8) & 255] << 8) |
1915
+ f[255 & n]) ^
1916
+ c[p++]),
1917
+ (s =
1918
+ ((f[h >>> 24] << 24) |
1919
+ (f[(k >>> 16) & 255] << 16) |
1920
+ (f[(n >>> 8) & 255] << 8) |
1921
+ f[255 & g]) ^
1922
+ c[p++]),
1923
+ (t =
1924
+ ((f[k >>> 24] << 24) |
1925
+ (f[(n >>> 16) & 255] << 16) |
1926
+ (f[(g >>> 8) & 255] << 8) |
1927
+ f[255 & h]) ^
1928
+ c[p++]),
1929
+ (n =
1930
+ ((f[n >>> 24] << 24) |
1931
+ (f[(g >>> 16) & 255] << 16) |
1932
+ (f[(h >>> 8) & 255] << 8) |
1933
+ f[255 & k]) ^
1934
+ c[p++]),
1935
+ (a[b] = q),
1936
+ (a[b + 1] = s),
1937
+ (a[b + 2] = t),
1938
+ (a[b + 3] = n);
1939
+ },
1940
+ keySize: 8,
1941
+ }));
1942
+ u.AES = p._createHelper(d);
1943
+ })();
1944
+ export default RSAKey;
1945
+ //# sourceMappingURL=rsa.js.map