﻿var b = { V: function(a) { try { return unescape(encodeURIComponent(a)) } catch (c) { throw "error during utf8 encoding: aesAlg.encode_utf8."; } }, T: function(a) { try { return decodeURIComponent(escape(a)) } catch (c) { throw "error during utf8 decoding: aesAlg.decode_utf8. The most likely cause of this is attempting to decrypt with incorrect key or iv, or with the wrong mode."; } }, F: function() { var a = []; a = arguments.length == 1 && arguments[0].constructor == Array ? arguments[0] : arguments; for (var c = "", d = 0; d < a.length; d++) c += (a[d] < 16 ? "0" : "") + a[d].toString(16); return c.toLowerCase() }, ea: function(a) { var c = []; a.replace(/(..)/g, function(d) { c.push(parseInt(d, 16)) }); return c }, X: function(a, c) { if (a === null) a = 0; if (c === null) c = 1; return Math.round(Math.random() * c) + a }, W: function(a) { if (a === null) a = 16; for (var c = [], d = 0; d < a; d++) c.push(b.X(0, 255)); return c }, fa: function(a, c) { return b.b.N(a).slice(0, c) }, U: function(a) { if (typeof RIP == "undefined") return ""; var c = "", d = b.F(b.W(b.a.h.p)); if (a = b.f(RIP + "___MY_SEP___" + a, b.i.l, b.a.R, b.a.h.m, b.ea(d))) { c = ""; for (var e = 0; e < a.z.length; e++) c += b.F(a.z.charCodeAt(e)); a = []; for (e = 0; e < d.length; e++) { a.push(d.charAt(e)); a.push(c.charAt(e)) } c.length > 32 && a.push(c.substr(32)); c = a.join("") } return c }, b: { e: 8, Y: 0, c: function(a, c) { var d = (a & 65535) + (c & 65535); return (a >> 16) + (c >> 16) + (d >> 16) << 16 | d & 65535 }, g: function(a, c) { return a >>> c | a << 32 - c }, v: function(a, c) { return a >>> c }, G: function(a, c, d) { return a & c ^ ~a & d }, J: function(a, c, d) { return a & c ^ a & d ^ c & d }, L: function(a) { return b.b.g(a, 2) ^ b.b.g(a, 13) ^ b.b.g(a, 22) }, M: function(a) { return b.b.g(a, 6) ^ b.b.g(a, 11) ^ b.b.g(a, 25) }, H: function(a) { return b.b.g(a, 7) ^ b.b.g(a, 18) ^ b.b.v(a, 3) }, I: function(a) { return b.b.g(a, 17) ^ b.b.g(a, 19) ^ b.b.v(a, 10) }, q: function(a, c) { var d = [1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298], e = [1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225], f = [], h, j, g, k, n, o, p, q, m, l, r; a[c >> 5] |= 128 << 24 - c % 32; a[(c + 64 >> 9 << 4) + 15] = c; for (q = 0; q < a.length; q += 16) { c = e[0]; h = e[1]; j = e[2]; g = e[3]; k = e[4]; n = e[5]; o = e[6]; p = e[7]; for (m = 0; m < 64; m++) { f[m] = m < 16 ? a[m + q] : b.b.c(b.b.c(b.b.c(b.b.I(f[m - 2]), f[m - 7]), b.b.H(f[m - 15])), f[m - 16]); l = b.b.c(b.b.c(b.b.c(b.b.c(p, b.b.M(k)), b.b.G(k, n, o)), d[m]), f[m]); r = b.b.c(b.b.L(c), b.b.J(c, h, j)); p = o; o = n; n = k; k = b.b.c(g, l); g = j; j = h; h = c; c = b.b.c(l, r) } e[0] = b.b.c(c, e[0]); e[1] = b.b.c(h, e[1]); e[2] = b.b.c(j, e[2]); e[3] = b.b.c(g, e[3]); e[4] = b.b.c(k, e[4]); e[5] = b.b.c(n, e[5]); e[6] = b.b.c(o, e[6]); e[7] = b.b.c(p, e[7]) } return e }, s: function(a) { for (var c = [], d = (1 << b.b.e) - 1, e = 0; e < a.length * b.b.e; e += b.b.e) c[e >> 5] |= (a.charCodeAt(e / b.b.e) & d) << 24 - e % 32; return c }, Q: function(a) { for (var c = "", d = (1 << b.b.e) - 1, e = 0; e < a.length * 32; e += b.b.e) c += String.fromCharCode(a[e >> 5] >>> 24 - e % 32 & d); return c }, O: function(a) { for (var c = [], d = (1 << b.b.e) - 1, e = 0; e < a.length * 32; e += b.b.e) c.push(a[e >> 5] >>> 24 - e % 32 & d); return c }, P: function(a) { for (var c = b.b.Y ? "0123456789ABCDEF" : "0123456789abcdef", d = "", e = 0; e < a.length * 4; e++) d += c.charAt(a[e >> 2] >> (3 - e % 4) * 8 + 4 & 15) + c.charAt(a[e >> 2] >> (3 - e % 4) * 8 & 15); return d }, ga: function(a) { return b.b.P(b.b.q(b.b.s(a), a.length * b.b.e)) }, N: function(a) { return b.b.O(b.b.q(b.b.s(a), a.length * b.b.e)) }, ja: function(a) { return b.b.Q(b.b.q(b.b.s(a), a.length * b.b.e)) } }, a: { h: { p: 16, w: 24, m: 32 }, r: [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22], ca: [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125], R: [93, 83, 6, 19, 150, 159, 234, 192, 137, 70, 227, 55, 181, 243, 177, 24, 155, 47, 11, 12, 167, 58, 129, 47, 75, 131, 165, 4, 160, 199, 115, 178], rotate: function(a) { for (var c = a[0], d = 0; d < 3; d++) a[d] = a[d + 1]; a[3] = c; return a }, K: [141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204, 131, 29, 58, 116, 232, 203, 141, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145, 57, 114, 228, 211, 189, 97, 194, 159, 37, 74, 148, 51, 102, 204, 131, 29, 58, 116, 232, 203], S: function(a, c) { a = b.a.rotate(a); for (var d = 0; d < 4; ++d) a[d] = b.a.r[a[d]]; a[0] ^= b.a.K[c]; return a }, C: function(a, c, d) { for (var e = 0, f = 1, h = [], j = [], g = 0; g < d; g++) j[g] = 0; for (g = 0; g < c; g++) j[g] = a[g]; for (e += c; e < d; ) { for (a = 0; a < 4; a++) h[a] = j[e - 4 + a]; if (e % c == 0) h = b.a.S(h, f++); if (c == b.a.h.m && e % c == 16) for (a = 0; a < 4; a++) h[a] = b.a.r[h[a]]; for (a = 0; a < 4; a++) { j[e] = j[e - c] ^ h[a]; e++ } } return j }, j: function(a, c) { for (var d = 0; d < 16; d++) a[d] ^= c[d]; return a }, k: function(a, c) { for (var d = [], e = 0; e < 4; e++) for (var f = 0; f < 4; f++) d[f * 4 + e] = a[c + e * 4 + f]; return d }, d: function(a, c) { for (var d = 0, e = 0; e < 8; e++) { if ((c & 1) == 1) d ^= a; if (d > 256) d ^= 256; var f = a & 128; a <<= 1; if (a > 256) a ^= 256; if (f == 128) a ^= 27; if (a > 256) a ^= 256; c >>= 1; if (c > 256) c ^= 256 } return d }, o: function(a, c) { for (var d = 0; d < 16; d++) a[d] = c ? b.a.ca[a[d]] : b.a.r[a[d]]; return a }, n: function(a, c) { for (var d = 0; d < 4; d++) a = b.a.da(a, d * 4, d, c); return a }, da: function(a, c, d, e) { for (var f = 0; f < d; f++) if (e) { for (var h = a[c + 3], j = 3; j > 0; j--) a[c + j] = a[c + j - 1]; a[c] = h } else { h = a[c]; for (j = 0; j < 3; j++) a[c + j] = a[c + j + 1]; a[c + 3] = h } return a }, D: function(a, c) { for (var d = [], e = 0; e < 4; e++) { for (var f = 0; f < 4; f++) d[f] = a[f * 4 + e]; d = b.a.ba(d, c); for (f = 0; f < 4; f++) a[f * 4 + e] = d[f] } return a }, ba: function(a, c) { var d = []; d = c ? [14, 9, 13, 11] : [2, 1, 1, 3]; c = []; for (var e = 0; e < 4; e++) c[e] = a[e]; a[0] = b.a.d(c[0], d[0]) ^ b.a.d(c[3], d[1]) ^ b.a.d(c[2], d[2]) ^ b.a.d(c[1], d[3]); a[1] = b.a.d(c[1], d[0]) ^ b.a.d(c[0], d[1]) ^ b.a.d(c[3], d[2]) ^ b.a.d(c[2], d[3]); a[2] = b.a.d(c[2], d[0]) ^ b.a.d(c[1], d[1]) ^ b.a.d(c[0], d[2]) ^ b.a.d(c[3], d[3]); a[3] = b.a.d(c[3], d[0]) ^ b.a.d(c[2], d[1]) ^ b.a.d(c[1], d[2]) ^ b.a.d(c[0], d[3]); return a }, round: function(a, c) { a = b.a.o(a, false); a = b.a.n(a, false); a = b.a.D(a, false); return a = b.a.j(a, c) }, $: function(a, c) { a = b.a.n(a, true); a = b.a.o(a, true); a = b.a.j(a, c); return a = b.a.D(a, true) }, aa: function(a, c, d) { a = b.a.j(a, b.a.k(c, 0)); for (var e = 1; e < d; e++) a = b.a.round(a, b.a.k(c, 16 * e)); a = b.a.o(a, false); a = b.a.n(a, false); return a = b.a.j(a, b.a.k(c, 16 * d)) }, Z: function(a, c, d) { a = b.a.j(a, b.a.k(c, 16 * d)); for (d = d - 1; d > 0; d--) a = b.a.$(a, b.a.k(c, 16 * d)); a = b.a.n(a, true); a = b.a.o(a, true); return a = b.a.j(a, b.a.k(c, 0)) }, f: function(a, c, d) { var e = [], f, h = []; switch (d) { case b.a.h.p: f = 10; break; case b.a.h.w: f = 12; break; case b.a.h.m: f = 14; break; default: alert("Invalid Key Size Specified:" + d); return null } for (var j = 16 * (f + 1), g = 0; g < 4; g++) for (var k = 0; k < 4; k++) h[g + k * 4] = a[g * 4 + k]; a = b.a.C(c, d, j); h = b.a.aa(h, a, f); for (f = 0; f < 4; f++) for (a = 0; a < 4; a++) e[f * 4 + a] = h[f + a * 4]; return e }, B: function(a, c, d) { var e = [], f, h = []; switch (d) { case b.a.h.p: f = 10; break; case b.a.h.w: f = 12; break; case b.a.h.m: f = 14; break; default: alert("Invalid Key Size Specified: " + d); return null } for (var j = 16 * (f + 1), g = 0; g < 4; g++) for (var k = 0; k < 4; k++) h[g + k * 4] = a[g * 4 + k]; a = b.a.C(c, d, j); h = b.a.Z(h, a, f); for (f = 0; f < 4; f++) for (a = 0; a < 4; a++) e[f * 4 + a] = h[f + a * 4]; return e } }, i: { u: 0, t: 1, l: 2 }, A: function(a, c, d, e) { if (d - c > 16) d = c + 16; e = e == b.i.l ? [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] : []; var f = 0; for (c = c; c < d; c++) { e[f] = a.charCodeAt(c); f++ } return e }, f: function(a, c, d, e, f) { a = b.V(a); if (d.length % e) throw "Key length does not match specified size."; if (f.length % 16) throw "iv length must be 128 bits."; var h = [], j = [], g = [], k = [], n = "", o = true; if (a !== null) for (var p = 0; p < Math.ceil(a.length / 16); p++) { var q = p * 16, m = p * 16 + 16; if (p * 16 + 16 > a.length) m = a.length; h = b.A(a, q, m, c); if (c == b.i.t) { if (o) { g = b.a.f(f, d, e); o = false } else g = b.a.f(j, d, e); for (var l = 0; l < 16; l++) k[l] = h[l] ^ g[l]; for (h = 0; h < m - q; h++) n += String.fromCharCode(k[h]); j = k } else if (c == b.i.u) { if (o) { g = b.a.f(f, d, e); o = false } else g = b.a.f(j, d, e); for (l = 0; l < 16; l++) k[l] = h[l] ^ g[l]; for (h = 0; h < m - q; h++) n += String.fromCharCode(k[h]); j = g } else if (c == b.i.l) { for (l = 0; l < 16; l++) j[l] = h[l] ^ (o ? f[l] : k[l]); o = false; k = b.a.f(j, d, e); for (h = 0; h < 16; h++) n += String.fromCharCode(k[h]) } } return { ha: c, ia: a.length, z: n} }, B: function(a, c, d, e, f, h) { if (e.length % f) throw "Key length does not match specified size."; if (h.length % 16) throw "iv length must be 128 bits."; var j = [], g = [], k = [], n = [], o = "", p = true; if (a !== null) for (var q = 0; q < Math.ceil(a.length / 16); q++) { var m = q * 16, l = q * 16 + 16; if (q * 16 + 16 > a.length) l = a.length; j = b.A(a, m, l, d); if (d == b.i.t) { if (p) { k = b.a.f(h, e, f); p = false } else k = b.a.f(g, e, f); for (i = 0; i < 16; i++) n[i] = k[i] ^ j[i]; for (g = 0; g < l - m; g++) o += String.fromCharCode(n[g]); g = j } else if (d == b.i.u) { if (p) { k = b.a.f(h, e, f); p = false } else k = b.a.f(g, e, f); for (i = 0; i < 16; i++) n[i] = k[i] ^ j[i]; for (g = 0; g < l - m; g++) o += String.fromCharCode(n[g]); g = k } else if (d == b.i.l) { k = b.a.B(j, e, f); for (i = 0; i < 16; i++) n[i] = (p ? h[i] : g[i]) ^ k[i]; p = false; if (c < l) for (g = 0; g < c - m; g++) o += String.fromCharCode(n[g]); else for (g = 0; g < l - m; g++) o += String.fromCharCode(n[g]); g = j } } return b.T(o) } }; top['aes'] = b;