1 line
24 KiB
JSON
1 line
24 KiB
JSON
{"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\n/* eslint-disable no-cond-assign */\n/* eslint-disable no-prototype-builtins */\n/* eslint-disable no-redeclare */\n/* eslint-disable prettier/prettier */\n/*\nCryptoJS v3.1.2\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\nvar CryptoJS = CryptoJS || function (u, p) {\n var d = {},\n l = d.lib = {},\n s = function () {},\n t = l.Base = {\n extend: function (a) {\n s.prototype = this;\n var c = new s();\n a && c.mixIn(a);\n c.hasOwnProperty(\"init\") || (c.init = function () {\n c.$super.init.apply(this, arguments);\n });\n c.init.prototype = c;\n c.$super = this;\n return c;\n },\n create: function () {\n var a = this.extend();\n a.init.apply(a, arguments);\n return a;\n },\n init: function () {},\n mixIn: function (a) {\n for (var c in a) a.hasOwnProperty(c) && (this[c] = a[c]);\n a.hasOwnProperty(\"toString\") && (this.toString = a.toString);\n },\n clone: function () {\n return this.init.prototype.extend(this);\n }\n },\n r = l.WordArray = t.extend({\n init: function (a, c) {\n a = this.words = a || [];\n this.sigBytes = c != p ? c : 4 * a.length;\n },\n toString: function (a) {\n return (a || v).stringify(this);\n },\n concat: function (a) {\n var c = this.words,\n e = a.words,\n j = this.sigBytes;\n a = a.sigBytes;\n this.clamp();\n if (j % 4) for (var k = 0; k < a; k++) c[j + k >>> 2] |= (e[k >>> 2] >>> 24 - 8 * (k % 4) & 255) << 24 - 8 * ((j + k) % 4);else if (65535 < e.length) for (k = 0; k < a; k += 4) c[j + k >>> 2] = e[k >>> 2];else c.push.apply(c, e);\n this.sigBytes += a;\n return this;\n },\n clamp: function () {\n var a = this.words,\n c = this.sigBytes;\n a[c >>> 2] &= 4294967295 << 32 - 8 * (c % 4);\n a.length = u.ceil(c / 4);\n },\n clone: function () {\n var a = t.clone.call(this);\n a.words = this.words.slice(0);\n return a;\n },\n random: function (a) {\n for (var c = [], e = 0; e < a; e += 4) c.push(4294967296 * u.random() | 0);\n return new r.init(c, a);\n }\n }),\n w = d.enc = {},\n v = w.Hex = {\n stringify: function (a) {\n var c = a.words;\n a = a.sigBytes;\n for (var e = [], j = 0; j < a; j++) {\n var k = c[j >>> 2] >>> 24 - 8 * (j % 4) & 255;\n e.push((k >>> 4).toString(16));\n e.push((k & 15).toString(16));\n }\n return e.join(\"\");\n },\n parse: function (a) {\n for (var c = a.length, e = [], j = 0; j < c; j += 2) e[j >>> 3] |= parseInt(a.substr(j, 2), 16) << 24 - 4 * (j % 8);\n return new r.init(e, c / 2);\n }\n },\n b = w.Latin1 = {\n stringify: function (a) {\n var c = a.words;\n a = a.sigBytes;\n for (var e = [], j = 0; j < a; j++) e.push(String.fromCharCode(c[j >>> 2] >>> 24 - 8 * (j % 4) & 255));\n return e.join(\"\");\n },\n parse: function (a) {\n for (var c = a.length, e = [], j = 0; j < c; j++) e[j >>> 2] |= (a.charCodeAt(j) & 255) << 24 - 8 * (j % 4);\n return new r.init(e, c);\n }\n },\n x = w.Utf8 = {\n stringify: function (a) {\n try {\n return decodeURIComponent(escape(b.stringify(a)));\n } catch (c) {\n throw Error(\"Malformed UTF-8 data\");\n }\n },\n parse: function (a) {\n return b.parse(unescape(encodeURIComponent(a)));\n }\n },\n q = l.BufferedBlockAlgorithm = t.extend({\n reset: function () {\n this._data = new r.init();\n this._nDataBytes = 0;\n },\n _append: function (a) {\n \"string\" == typeof a && (a = x.parse(a));\n this._data.concat(a);\n this._nDataBytes += a.sigBytes;\n },\n _process: function (a) {\n var c = this._data,\n e = c.words,\n j = c.sigBytes,\n k = this.blockSize,\n b = j / (4 * k),\n b = a ? u.ceil(b) : u.max((b | 0) - this._minBufferSize, 0);\n a = b * k;\n j = u.min(4 * a, j);\n if (a) {\n for (var q = 0; q < a; q += k) this._doProcessBlock(e, q);\n q = e.splice(0, a);\n c.sigBytes -= j;\n }\n return new r.init(q, j);\n },\n clone: function () {\n var a = t.clone.call(this);\n a._data = this._data.clone();\n return a;\n },\n _minBufferSize: 0\n });\n l.Hasher = q.extend({\n cfg: t.extend(),\n init: function (a) {\n this.cfg = this.cfg.extend(a);\n this.reset();\n },\n reset: function () {\n q.reset.call(this);\n this._doReset();\n },\n update: function (a) {\n this._append(a);\n this._process();\n return this;\n },\n finalize: function (a) {\n a && this._append(a);\n return this._doFinalize();\n },\n blockSize: 16,\n _createHelper: function (a) {\n return function (b, e) {\n return new a.init(e).finalize(b);\n };\n },\n _createHmacHelper: function (a) {\n return function (b, e) {\n return new n.HMAC.init(a, e).finalize(b);\n };\n }\n });\n var n = d.algo = {};\n return d;\n}(Math);\n(function () {\n var u = CryptoJS,\n p = u.lib.WordArray;\n u.enc.Base64 = {\n stringify: function (d) {\n var l = d.words,\n p = d.sigBytes,\n t = this._map;\n d.clamp();\n d = [];\n for (var r = 0; r < p; r += 3) for (var w = (l[r >>> 2] >>> 24 - 8 * (r % 4) & 255) << 16 | (l[r + 1 >>> 2] >>> 24 - 8 * ((r + 1) % 4) & 255) << 8 | l[r + 2 >>> 2] >>> 24 - 8 * ((r + 2) % 4) & 255, v = 0; 4 > v && r + 0.75 * v < p; v++) d.push(t.charAt(w >>> 6 * (3 - v) & 63));\n if (l = t.charAt(64)) for (; d.length % 4;) d.push(l);\n return d.join(\"\");\n },\n parse: function (d) {\n var l = d.length,\n s = this._map,\n t = s.charAt(64);\n t && (t = d.indexOf(t), -1 != t && (l = t));\n for (var t = [], r = 0, w = 0; w < l; w++) if (w % 4) {\n var v = s.indexOf(d.charAt(w - 1)) << 2 * (w % 4),\n b = s.indexOf(d.charAt(w)) >>> 6 - 2 * (w % 4);\n t[r >>> 2] |= (v | b) << 24 - 8 * (r % 4);\n r++;\n }\n return p.create(t, r);\n },\n _map: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\"\n };\n})();\n(function (u) {\n function p(b, n, a, c, e, j, k) {\n b = b + (n & a | ~n & c) + e + k;\n return (b << j | b >>> 32 - j) + n;\n }\n function d(b, n, a, c, e, j, k) {\n b = b + (n & c | a & ~c) + e + k;\n return (b << j | b >>> 32 - j) + n;\n }\n function l(b, n, a, c, e, j, k) {\n b = b + (n ^ a ^ c) + e + k;\n return (b << j | b >>> 32 - j) + n;\n }\n function s(b, n, a, c, e, j, k) {\n b = b + (a ^ (n | ~c)) + e + k;\n return (b << j | b >>> 32 - j) + n;\n }\n for (var t = CryptoJS, r = t.lib, w = r.WordArray, v = r.Hasher, r = t.algo, b = [], x = 0; 64 > x; x++) b[x] = 4294967296 * u.abs(u.sin(x + 1)) | 0;\n r = r.MD5 = v.extend({\n _doReset: function () {\n this._hash = new w.init([1732584193, 4023233417, 2562383102, 271733878]);\n },\n _doProcessBlock: function (q, n) {\n for (var a = 0; 16 > a; a++) {\n var c = n + a,\n e = q[c];\n q[c] = (e << 8 | e >>> 24) & 16711935 | (e << 24 | e >>> 8) & 4278255360;\n }\n var a = this._hash.words,\n c = q[n + 0],\n e = q[n + 1],\n j = q[n + 2],\n k = q[n + 3],\n z = q[n + 4],\n r = q[n + 5],\n t = q[n + 6],\n w = q[n + 7],\n v = q[n + 8],\n A = q[n + 9],\n B = q[n + 10],\n C = q[n + 11],\n u = q[n + 12],\n D = q[n + 13],\n E = q[n + 14],\n x = q[n + 15],\n f = a[0],\n m = a[1],\n g = a[2],\n h = a[3],\n f = p(f, m, g, h, c, 7, b[0]),\n h = p(h, f, m, g, e, 12, b[1]),\n g = p(g, h, f, m, j, 17, b[2]),\n m = p(m, g, h, f, k, 22, b[3]),\n f = p(f, m, g, h, z, 7, b[4]),\n h = p(h, f, m, g, r, 12, b[5]),\n g = p(g, h, f, m, t, 17, b[6]),\n m = p(m, g, h, f, w, 22, b[7]),\n f = p(f, m, g, h, v, 7, b[8]),\n h = p(h, f, m, g, A, 12, b[9]),\n g = p(g, h, f, m, B, 17, b[10]),\n m = p(m, g, h, f, C, 22, b[11]),\n f = p(f, m, g, h, u, 7, b[12]),\n h = p(h, f, m, g, D, 12, b[13]),\n g = p(g, h, f, m, E, 17, b[14]),\n m = p(m, g, h, f, x, 22, b[15]),\n f = d(f, m, g, h, e, 5, b[16]),\n h = d(h, f, m, g, t, 9, b[17]),\n g = d(g, h, f, m, C, 14, b[18]),\n m = d(m, g, h, f, c, 20, b[19]),\n f = d(f, m, g, h, r, 5, b[20]),\n h = d(h, f, m, g, B, 9, b[21]),\n g = d(g, h, f, m, x, 14, b[22]),\n m = d(m, g, h, f, z, 20, b[23]),\n f = d(f, m, g, h, A, 5, b[24]),\n h = d(h, f, m, g, E, 9, b[25]),\n g = d(g, h, f, m, k, 14, b[26]),\n m = d(m, g, h, f, v, 20, b[27]),\n f = d(f, m, g, h, D, 5, b[28]),\n h = d(h, f, m, g, j, 9, b[29]),\n g = d(g, h, f, m, w, 14, b[30]),\n m = d(m, g, h, f, u, 20, b[31]),\n f = l(f, m, g, h, r, 4, b[32]),\n h = l(h, f, m, g, v, 11, b[33]),\n g = l(g, h, f, m, C, 16, b[34]),\n m = l(m, g, h, f, E, 23, b[35]),\n f = l(f, m, g, h, e, 4, b[36]),\n h = l(h, f, m, g, z, 11, b[37]),\n g = l(g, h, f, m, w, 16, b[38]),\n m = l(m, g, h, f, B, 23, b[39]),\n f = l(f, m, g, h, D, 4, b[40]),\n h = l(h, f, m, g, c, 11, b[41]),\n g = l(g, h, f, m, k, 16, b[42]),\n m = l(m, g, h, f, t, 23, b[43]),\n f = l(f, m, g, h, A, 4, b[44]),\n h = l(h, f, m, g, u, 11, b[45]),\n g = l(g, h, f, m, x, 16, b[46]),\n m = l(m, g, h, f, j, 23, b[47]),\n f = s(f, m, g, h, c, 6, b[48]),\n h = s(h, f, m, g, w, 10, b[49]),\n g = s(g, h, f, m, E, 15, b[50]),\n m = s(m, g, h, f, r, 21, b[51]),\n f = s(f, m, g, h, u, 6, b[52]),\n h = s(h, f, m, g, k, 10, b[53]),\n g = s(g, h, f, m, B, 15, b[54]),\n m = s(m, g, h, f, e, 21, b[55]),\n f = s(f, m, g, h, v, 6, b[56]),\n h = s(h, f, m, g, x, 10, b[57]),\n g = s(g, h, f, m, t, 15, b[58]),\n m = s(m, g, h, f, D, 21, b[59]),\n f = s(f, m, g, h, z, 6, b[60]),\n h = s(h, f, m, g, C, 10, b[61]),\n g = s(g, h, f, m, j, 15, b[62]),\n m = s(m, g, h, f, A, 21, b[63]);\n a[0] = a[0] + f | 0;\n a[1] = a[1] + m | 0;\n a[2] = a[2] + g | 0;\n a[3] = a[3] + h | 0;\n },\n _doFinalize: function () {\n var b = this._data,\n n = b.words,\n a = 8 * this._nDataBytes,\n c = 8 * b.sigBytes;\n n[c >>> 5] |= 128 << 24 - c % 32;\n var e = u.floor(a / 4294967296);\n n[(c + 64 >>> 9 << 4) + 15] = (e << 8 | e >>> 24) & 16711935 | (e << 24 | e >>> 8) & 4278255360;\n n[(c + 64 >>> 9 << 4) + 14] = (a << 8 | a >>> 24) & 16711935 | (a << 24 | a >>> 8) & 4278255360;\n b.sigBytes = 4 * (n.length + 1);\n this._process();\n b = this._hash;\n n = b.words;\n for (a = 0; 4 > a; a++) c = n[a], n[a] = (c << 8 | c >>> 24) & 16711935 | (c << 24 | c >>> 8) & 4278255360;\n return b;\n },\n clone: function () {\n var b = v.clone.call(this);\n b._hash = this._hash.clone();\n return b;\n }\n });\n t.MD5 = v._createHelper(r);\n t.HmacMD5 = v._createHmacHelper(r);\n})(Math);\n(function () {\n var u = CryptoJS,\n p = u.lib,\n d = p.Base,\n l = p.WordArray,\n p = u.algo,\n s = p.EvpKDF = d.extend({\n cfg: d.extend({\n keySize: 4,\n hasher: p.MD5,\n iterations: 1\n }),\n init: function (d) {\n this.cfg = this.cfg.extend(d);\n },\n compute: function (d, r) {\n for (var p = this.cfg, s = p.hasher.create(), b = l.create(), u = b.words, q = p.keySize, p = p.iterations; u.length < q;) {\n n && s.update(n);\n var n = s.update(d).finalize(r);\n s.reset();\n for (var a = 1; a < p; a++) n = s.finalize(n), s.reset();\n b.concat(n);\n }\n b.sigBytes = 4 * q;\n return b;\n }\n });\n u.EvpKDF = function (d, l, p) {\n return s.create(p).compute(d, l);\n };\n})();\nCryptoJS.lib.Cipher || function (u) {\n var p = CryptoJS,\n d = p.lib,\n l = d.Base,\n s = d.WordArray,\n t = d.BufferedBlockAlgorithm,\n r = p.enc.Base64,\n w = p.algo.EvpKDF,\n v = d.Cipher = t.extend({\n cfg: l.extend(),\n createEncryptor: function (e, a) {\n return this.create(this._ENC_XFORM_MODE, e, a);\n },\n createDecryptor: function (e, a) {\n return this.create(this._DEC_XFORM_MODE, e, a);\n },\n init: function (e, a, b) {\n this.cfg = this.cfg.extend(b);\n this._xformMode = e;\n this._key = a;\n this.reset();\n },\n reset: function () {\n t.reset.call(this);\n this._doReset();\n },\n process: function (e) {\n this._append(e);\n return this._process();\n },\n finalize: function (e) {\n e && this._append(e);\n return this._doFinalize();\n },\n keySize: 4,\n ivSize: 4,\n _ENC_XFORM_MODE: 1,\n _DEC_XFORM_MODE: 2,\n _createHelper: function (e) {\n return {\n encrypt: function (b, k, d) {\n return (\"string\" == typeof k ? c : a).encrypt(e, b, k, d);\n },\n decrypt: function (b, k, d) {\n return (\"string\" == typeof k ? c : a).decrypt(e, b, k, d);\n }\n };\n }\n });\n d.StreamCipher = v.extend({\n _doFinalize: function () {\n return this._process(!0);\n },\n blockSize: 1\n });\n var b = p.mode = {},\n x = function (e, a, b) {\n var c = this._iv;\n c ? this._iv = u : c = this._prevBlock;\n for (var d = 0; d < b; d++) e[a + d] ^= c[d];\n },\n q = (d.BlockCipherMode = l.extend({\n createEncryptor: function (e, a) {\n return this.Encryptor.create(e, a);\n },\n createDecryptor: function (e, a) {\n return this.Decryptor.create(e, a);\n },\n init: function (e, a) {\n this._cipher = e;\n this._iv = a;\n }\n })).extend();\n q.Encryptor = q.extend({\n processBlock: function (e, a) {\n var b = this._cipher,\n c = b.blockSize;\n x.call(this, e, a, c);\n b.encryptBlock(e, a);\n this._prevBlock = e.slice(a, a + c);\n }\n });\n q.Decryptor = q.extend({\n processBlock: function (e, a) {\n var b = this._cipher,\n c = b.blockSize,\n d = e.slice(a, a + c);\n b.decryptBlock(e, a);\n x.call(this, e, a, c);\n this._prevBlock = d;\n }\n });\n b = b.CBC = q;\n q = (p.pad = {}).Pkcs7 = {\n pad: function (a, b) {\n for (var c = 4 * b, c = c - a.sigBytes % c, d = c << 24 | c << 16 | c << 8 | c, l = [], n = 0; n < c; n += 4) l.push(d);\n c = s.create(l, c);\n a.concat(c);\n },\n unpad: function (a) {\n a.sigBytes -= a.words[a.sigBytes - 1 >>> 2] & 255;\n }\n };\n d.BlockCipher = v.extend({\n cfg: v.cfg.extend({\n mode: b,\n padding: q\n }),\n reset: function () {\n v.reset.call(this);\n var a = this.cfg,\n b = a.iv,\n a = a.mode;\n if (this._xformMode == this._ENC_XFORM_MODE) var c = a.createEncryptor;else c = a.createDecryptor, this._minBufferSize = 1;\n this._mode = c.call(a, this, b && b.words);\n },\n _doProcessBlock: function (a, b) {\n this._mode.processBlock(a, b);\n },\n _doFinalize: function () {\n var a = this.cfg.padding;\n if (this._xformMode == this._ENC_XFORM_MODE) {\n a.pad(this._data, this.blockSize);\n var b = this._process(!0);\n } else b = this._process(!0), a.unpad(b);\n return b;\n },\n blockSize: 4\n });\n var n = d.CipherParams = l.extend({\n init: function (a) {\n this.mixIn(a);\n },\n toString: function (a) {\n return (a || this.formatter).stringify(this);\n }\n }),\n b = (p.format = {}).OpenSSL = {\n stringify: function (a) {\n var b = a.ciphertext;\n a = a.salt;\n return (a ? s.create([1398893684, 1701076831]).concat(a).concat(b) : b).toString(r);\n },\n parse: function (a) {\n a = r.parse(a);\n var b = a.words;\n if (1398893684 == b[0] && 1701076831 == b[1]) {\n var c = s.create(b.slice(2, 4));\n b.splice(0, 4);\n a.sigBytes -= 16;\n }\n return n.create({\n ciphertext: a,\n salt: c\n });\n }\n },\n a = d.SerializableCipher = l.extend({\n cfg: l.extend({\n format: b\n }),\n encrypt: function (a, b, c, d) {\n d = this.cfg.extend(d);\n var l = a.createEncryptor(c, d);\n b = l.finalize(b);\n l = l.cfg;\n return n.create({\n ciphertext: b,\n key: c,\n iv: l.iv,\n algorithm: a,\n mode: l.mode,\n padding: l.padding,\n blockSize: a.blockSize,\n formatter: d.format\n });\n },\n decrypt: function (a, b, c, d) {\n d = this.cfg.extend(d);\n b = this._parse(b, d.format);\n return a.createDecryptor(c, d).finalize(b.ciphertext);\n },\n _parse: function (a, b) {\n return \"string\" == typeof a ? b.parse(a, this) : a;\n }\n }),\n p = (p.kdf = {}).OpenSSL = {\n execute: function (a, b, c, d) {\n d || (d = s.random(8));\n a = w.create({\n keySize: b + c\n }).compute(a, d);\n c = s.create(a.words.slice(b), 4 * c);\n a.sigBytes = 4 * b;\n return n.create({\n key: a,\n iv: c,\n salt: d\n });\n }\n },\n c = d.PasswordBasedCipher = a.extend({\n cfg: a.cfg.extend({\n kdf: p\n }),\n encrypt: function (b, c, d, l) {\n l = this.cfg.extend(l);\n d = l.kdf.execute(d, b.keySize, b.ivSize);\n l.iv = d.iv;\n b = a.encrypt.call(this, b, c, d.key, l);\n b.mixIn(d);\n return b;\n },\n decrypt: function (b, c, d, l) {\n l = this.cfg.extend(l);\n c = this._parse(c, l.format);\n d = l.kdf.execute(d, b.keySize, b.ivSize, c.salt);\n l.iv = d.iv;\n return a.decrypt.call(this, b, c, d.key, l);\n }\n });\n}();\n(function () {\n 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++) a[c] = 128 > c ? c << 1 : c << 1 ^ 283;\n for (var e = 0, j = 0, c = 0; 256 > c; c++) {\n var k = j ^ j << 1 ^ j << 2 ^ j << 3 ^ j << 4,\n k = k >>> 8 ^ k & 255 ^ 99;\n l[e] = k;\n s[k] = e;\n var z = a[e],\n F = a[z],\n G = a[F],\n y = 257 * a[k] ^ 16843008 * k;\n t[e] = y << 24 | y >>> 8;\n r[e] = y << 16 | y >>> 16;\n w[e] = y << 8 | y >>> 24;\n v[e] = y;\n y = 16843009 * G ^ 65537 * F ^ 257 * z ^ 16843008 * e;\n b[k] = y << 24 | y >>> 8;\n x[k] = y << 16 | y >>> 16;\n q[k] = y << 8 | y >>> 24;\n n[k] = y;\n e ? (e = z ^ a[a[a[G ^ z]]], j ^= a[a[j]]) : e = j = 1;\n }\n var H = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54],\n d = d.AES = p.extend({\n _doReset: function () {\n for (var a = this._key, c = a.words, d = a.sigBytes / 4, a = 4 * ((this._nRounds = d + 6) + 1), e = this._keySchedule = [], j = 0; j < a; j++) if (j < d) e[j] = c[j];else {\n var k = e[j - 1];\n j % d ? 6 < d && 4 == j % d && (k = l[k >>> 24] << 24 | l[k >>> 16 & 255] << 16 | l[k >>> 8 & 255] << 8 | l[k & 255]) : (k = k << 8 | k >>> 24, k = l[k >>> 24] << 24 | l[k >>> 16 & 255] << 16 | l[k >>> 8 & 255] << 8 | l[k & 255], k ^= H[j / d | 0] << 24);\n e[j] = e[j - d] ^ k;\n }\n c = this._invKeySchedule = [];\n for (d = 0; d < a; d++) j = a - d, k = d % 4 ? e[j] : e[j - 4], c[d] = 4 > d || 4 >= j ? k : b[l[k >>> 24]] ^ x[l[k >>> 16 & 255]] ^ q[l[k >>> 8 & 255]] ^ n[l[k & 255]];\n },\n encryptBlock: function (a, b) {\n this._doCryptBlock(a, b, this._keySchedule, t, r, w, v, l);\n },\n decryptBlock: function (a, c) {\n var d = a[c + 1];\n a[c + 1] = a[c + 3];\n a[c + 3] = d;\n this._doCryptBlock(a, c, this._invKeySchedule, b, x, q, n, s);\n d = a[c + 1];\n a[c + 1] = a[c + 3];\n a[c + 3] = d;\n },\n _doCryptBlock: function (a, b, c, d, e, j, l, f) {\n 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; r < m; r++) var q = d[g >>> 24] ^ e[h >>> 16 & 255] ^ j[k >>> 8 & 255] ^ l[n & 255] ^ c[p++], s = d[h >>> 24] ^ e[k >>> 16 & 255] ^ j[n >>> 8 & 255] ^ l[g & 255] ^ c[p++], t = d[k >>> 24] ^ e[n >>> 16 & 255] ^ j[g >>> 8 & 255] ^ l[h & 255] ^ c[p++], n = d[n >>> 24] ^ e[g >>> 16 & 255] ^ j[h >>> 8 & 255] ^ l[k & 255] ^ c[p++], g = q, h = s, k = t;\n q = (f[g >>> 24] << 24 | f[h >>> 16 & 255] << 16 | f[k >>> 8 & 255] << 8 | f[n & 255]) ^ c[p++];\n s = (f[h >>> 24] << 24 | f[k >>> 16 & 255] << 16 | f[n >>> 8 & 255] << 8 | f[g & 255]) ^ c[p++];\n t = (f[k >>> 24] << 24 | f[n >>> 16 & 255] << 16 | f[g >>> 8 & 255] << 8 | f[h & 255]) ^ c[p++];\n n = (f[n >>> 24] << 24 | f[g >>> 16 & 255] << 16 | f[h >>> 8 & 255] << 8 | f[k & 255]) ^ c[p++];\n a[b] = q;\n a[b + 1] = s;\n a[b + 2] = t;\n a[b + 3] = n;\n },\n keySize: 8\n });\n u.AES = p._createHelper(d);\n})();\n\n/*CryptoJS v3.1.2\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License*/\n/* Zero padding strategy.*/\n\nCryptoJS.pad.ZeroPadding = {\n pad: function (data, blockSize) {\n // Shortcut\n var blockSizeBytes = blockSize * 4;\n\n // Pad\n data.clamp();\n data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes);\n },\n unpad: function (data) {\n // Shortcut\n var dataWords = data.words;\n\n // Unpad\n var i = data.sigBytes - 1;\n while (!(dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 0xff)) {\n i--;\n }\n data.sigBytes = i + 1;\n }\n};\n\n/**\n * ===============================================\n * Created by ZHIHUA·WEI.\n * Author: ZHIHUA·WEI <zhihua_wei@foxmail.com>\n * Date: 2018/2/27\n * Time: 10:20\n * Project: 基于PHP和JS的AES相互加密解密方法详解(CryptoJS)\n * Power: Javascript common function\n * ===============================================\n */\n\n/**\n * 接口数据加密函数\n * @param str string 需加密的json字符串\n * @param key string 加密key(16位)\n * @param iv string 加密向量(16位)\n * @return string 加密密文字符串\n */\nfunction encrypt(str) {\n //密钥16位\n var key = CryptoJS.enc.Utf8.parse('1519699179001WZH');\n //加密向量16位\n var iv = CryptoJS.enc.Utf8.parse('ZZWBKJ_ZHIHUAWEI');\n var encrypted = CryptoJS.AES.encrypt(str, key, {\n iv: iv,\n mode: CryptoJS.mode.CBC,\n padding: CryptoJS.pad.ZeroPadding\n });\n return encrypted;\n}\n\n/**\n * 接口数据解密函数\n * @param str string 已加密密文\n * @param key string 加密key(16位)\n * @param iv string 加密向量(16位)\n * @returns {*|string} 解密之后的json字符串\n */\n\n//********************************加密**********************************\n//获取当前时间戳13位 + 3位字符\n//var timestamp = new Date().getTime().toString() + \"WZH\";\n//加密密钥16位\n//var encrypt_key = timestamp;\n// var encrypt_key = '1519699179001WZH';\n//加密向量16位\n// var iv = 'ZZWBKJ_ZHIHUAWEI';\n\nfunction decrypt(str) {\n //密钥16位\n var key = CryptoJS.enc.Utf8.parse('1519699179001WZH');\n //加密向量16位\n var iv = CryptoJS.enc.Utf8.parse('ZZWBKJ_ZHIHUAWEI');\n var decrypted = CryptoJS.AES.decrypt(str, key, {\n iv: iv,\n mode: CryptoJS.mode.CBC,\n padding: CryptoJS.pad.ZeroPadding\n });\n return decrypted.toString(CryptoJS.enc.Utf8);\n}\nexport { encrypt, decrypt };","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]} |