function Gc() {
this.secretKey = "11HDESaAhiHHugDz";
this.iv = "";
this.hexString = !1;
this.encryptData_ECB = function (a) {
try {
var b = new hc,
c = new gc;
c.isPadding = !0;
c.mode = b.SM4_ENCRYPT;
var d = stringToByte(this.secretKey);
b.sm4_setkey_enc(c, d);
var e = b.sm4_crypt_ecb(c, stringToByte(a)),
f = base64js.fromByteArray(e);
null != f && 0 < f.trim().length && f.replace(/(\s*|\t|\r|\n)/g, "");
return f
} catch (g) {
return null
}
};
this.encryptData_CBC = function (a) {
try {
var b = new hc,
c = new gc;
c.isPadding = !0;
c.mode = b.SM4_ENCRYPT;
var d = stringToByte(this.secretKey),
e = stringToByte(this.iv);
b.sm4_setkey_enc(c, d);
var f = b.sm4_crypt_cbc(c, e, stringToByte(a)),
g = base64js.fromByteArray(f);
null != g && 0 < g.trim().length && g.replace(/(\s*|\t|\r|\n)/g, "");
return g
} catch (h) {
return null
}
};
stringToByte = function (a) {
var b = [],
c, d;
c = a.length;
for (var e = 0; e < c; e++)
d = a.charCodeAt(e),
65536 <= d && 1114111 >= d ? (b.push(d >> 18 & 7 | 240),
b.push(d >> 12 & 63 | 128),
b.push(d >> 6 & 63 | 128),
b.push(d & 63 | 128)) : 2048 <= d && 65535 >= d ? (b.push(d >> 12 & 15 | 224),
b.push(d >> 6 & 63 | 128),
b.push(d & 63 | 128)) : 128 <= d && 2047 >= d ? (b.push(d >> 6 & 31 | 192),
b.push(d & 63 | 128)) : b.push(d & 255);
return b
};
byteToString = function (a) {
if ("string" === typeof a)
return a;
for (var b = "", c = 0; c < a.length; c++) {
var d = a[c].toString(2),
e = d.match(/^1+?(?=0)/);
if (e && 8 == d.length) {
for (var d = e[0].length, e = a[c].toString(2).slice(7 - d), f = 1; f < d; f++)
e += a[f + c].toString(2).slice(2);
b += String.fromCharCode(parseInt(e, 2));
c += d - 1
} else
b += String.fromCharCode(a[c])
}
return b
}
}
function hc() {
this.SM4_ENCRYPT = 1;
this.SM4_DECRYPT = 0;
var a = [214, 144, 233, 254, 204, 225, 61, 183, 22, 182, 20, 194, 40, 251, 44, 5, 43, 103, 154, 118, 42, 190, 4, 195, 170, 68, 19, 38, 73, 134, 6, 153, 156, 66, 80, 244, 145, 239, 152, 122, 51, 84, 11, 67, 237, 207, 172, 98, 228, 179, 28, 169, 201, 8, 232, 149, 128, 223, 148, 250, 117, 143, 63, 166, 71, 7, 167, 252, 243, 115, 23, 186, 131, 89, 60, 25, 230, 133, 79, 168, 104, 107, 129, 178, 113, 100, 218, 139, 248, 235, 15, 75, 112, 86, 157, 53, 30, 36, 14, 94, 99, 88, 209, 162, 37, 34, 124, 59, 1, 33, 120, 135, 212, 0, 70, 87, 159, 211, 39, 82, 76, 54, 2, 231, 160, 196, 200, 158, 234, 191, 138, 210, 64, 199, 56, 181, 163, 247, 242, 206, 249, 97, 21, 161, 224, 174, 93, 164, 155, 52, 26, 85, 173, 147, 50, 48, 245, 140, 177, 227, 29, 246, 226, 46, 130, 102, 202, 96, 192, 41, 35, 171, 13, 83, 78, 111, 213, 219, 55, 69, 222, 253, 142, 47, 3, 255, 106, 114, 109, 108, 91, 81, 141, 27, 175, 146, 187, 221, 188, 127, 17, 217, 92, 65, 31, 16, 90, 216, 10, 193, 49, 136, 165, 205, 123, 189, 45, 116, 208, 18, 184, 229, 180, 176, 137, 105, 151, 74, 12, 150, 119, 126, 101, 185, 241, 9, 197, 110, 198, 132, 24, 240, 125, 236, 58, 220, 77, 32, 121, 238, 95, 62, 215, 203, 57, 72],
b = [2746333894, 1453994832, 1736282519, 2993693404],
c = [462357, 472066609, 943670861, 1415275113, 1886879365, 2358483617, 2830087869, 3301692121, 3773296373, 4228057617, 404694573, 876298825, 1347903077, 1819507329, 2291111581, 2762715833, 3234320085, 3705924337, 4177462797, 337322537, 808926789, 1280531041, 1752135293, 2223739545, 2695343797, 3166948049, 3638552301, 4110090761, 269950501, 741554753, 1213159005, 1684763257];
this.GET_ULONG_BE = function (a, b) {
return (a & 255) << 24 | (a[b + 1] & 255) << 16 | (a[b + 2] & 255) << 8 | a[b + 3] & 255
};
this.PUT_ULONG_BE = function (a, b, c) {
var d = 255 & a >> 24,
e = 255 & a >> 16,
f = 255 & a >> 8;
a &= 255;
b[c] = 128 < d ? d - 256 : d;
b[c + 1] = 128 < e ? e - 256 : e;
b[c + 2] = 128 < f ? f - 256 : f;
b[c + 3] = 128 < a ? a - 256 : a
};
this.SHL = function (a, b) {
return (a & 4294967295) << b
};
this.ROTL = function (a, b) {
return this.SHL(a, b) | a >> 32 - b
};
this.sm4Lt = function (a) {
var b = Array(4),
c = Array(4);
this.PUT_ULONG_BE(a, b, 0);
c[0] = this.sm4Sbox(b[0]);
c[1] = this.sm4Sbox(b[1]);
c[2] = this.sm4Sbox(b[2]);
c[3] = this.sm4Sbox(b[3]);
a = this.GET_ULONG_BE(c, 0);
return a ^ this.ROTL(a, 2) ^ this.ROTL(a, 10) ^ this.ROTL(a, 18) ^ this.ROTL(a, 24)
};
this.sm4F = function (a, b, c, g, h) {
return a ^ this.sm4Lt(b ^ c ^ g ^ h)
};
this.sm4CalciRK = function (a) {
var b = Array(4),
c = Array(4);
this.PUT_ULONG_BE(a, b, 0);
c[0] = this.sm4Sbox(b[0]);
c[1] = this.sm4Sbox(b[1]);
c[2] = this.sm4Sbox(b[2]);
c[3] = this.sm4Sbox(b[3]);
a = this.GET_ULONG_BE(c, 0);
return a ^ this.ROTL(a, 13) ^ this.ROTL(a, 23)
};
this.sm4Sbox = function (b) {
b = a[b & 255];
return 128 < b ? b - 256 : b
};
this.sm4_setkey_enc = function (a, b) {
if (null == a)
return alert("ctx is null!"), !1;
if (null == b || 16 != b.length)
return alert("key error!"), !1;
a.mode = this.SM4_ENCRYPT;
this.sm4_setkey(a.sk, b)
};
this.sm4_setkey = function (a, e) {
var d = Array(4),
g = Array(36);
d[0] = this.GET_ULONG_BE(e, 0);
d[1] = this.GET_ULONG_BE(e, 4);
d[2] = this.GET_ULONG_BE(e, 8);
d[3] = this.GET_ULONG_BE(e, 12);
g[0] = d[0] ^ b[0];
g[1] = d[1] ^ b[1];
g[2] = d[2] ^ b[2];
g[3] = d[3] ^ b[3];
for (e = 0; 32 > e; e++)
g[e + 4] = g[e] ^ this.sm4CalciRK(g[e + 1] ^ g[e + 2] ^ g[e + 3] ^ c[e]),
a[e] = g[e + 4]
};
this.padding = function (a, b) {
if (null == a)
return null;
if (b == this.SM4_ENCRYPT) {
var c = parseInt(16 - a.length % 16);
b = a.slice(0);
for (var d = 0; d < c; d++)
b[a.length + d] = c
} else
c = a[a.length - 1],
b = a.slice(0, a.length - c);
return b
};
this.sm4_one_round = function (a, b, c) {
var d = 0,
e = Array(36);
e[0] = this.GET_ULONG_BE(b, 0);
e[1] = this.GET_ULONG_BE(b, 4);
e[2] = this.GET_ULONG_BE(b, 8);
for (e[3] = this.GET_ULONG_BE(b, 12); 32 > d;)
e[d + 4] = this.sm4F(e[d], e[d + 1], e[d + 2], e[d + 3], a[d]),
d++;
this.PUT_ULONG_BE(e[35], c, 0);
this.PUT_ULONG_BE(e[34], c, 4);
this.PUT_ULONG_BE(e[33], c, 8);
this.PUT_ULONG_BE(e[32], c, 12)
};
this.sm4_crypt_ecb = function (a, b) {
null == b && alert("input is null!");
a.isPadding && a.mode == this.SM4_ENCRYPT && (b = this.padding(b, this.SM4_ENCRYPT));
for (var c = 0, d = b.length, e = []; 0 < d; d -= 16) {
var w = Array(16),
n = b.slice(16 * c, 16 * (c + 1));
this.sm4_one_round(a.sk, n, w);
e = e.concat(w);
c++
}
b = e;
a.isPadding && a.mode == this.SM4_DECRYPT && (b = this.padding(b, this.SM4_DECRYPT));
for (c = 0; c < b.length; c++)
0 > b[c] && (b[c] += 256);
return b
};
this.sm4_crypt_cbc = function (a, b, c) {
null != b && 16 == b.length || alert("iv error!");
null == c && alert("input is null!");
a.isPadding && a.mode == this.SM4_ENCRYPT && (c = this.padding(c, this.SM4_ENCRYPT));
var d, e = c.length,
f = [];
if (a.mode == this.SM4_ENCRYPT)
for (var n = 0; 0 < e; e -= 16) {
var t = Array(16),
p = Array(16),
m = c.slice(16 * n, 16 * (n + 1));
for (d = 0; 16 > d; d++)
t[d] = m[d] ^ b[d];
this.sm4_one_round(a.sk, t, p);
b = p.slice(0, 16);
f = f.concat(p);
n++
} else
for (var q, n = 0; 0 < e; e -= 16) {
t = Array(16);
p = Array(16);
m = c.slice(16 * n, 16 * (n + 1));
q = m.slice(0, 16);
sm4_one_round(a.sk, m, t);
for (d = 0; 16 > d; d++)
p[d] = t[d] ^ b[d];
b = q.slice(0, 16);
f = f.concat(p);
n++
}
b = f;
a.isPadding && a.mode == this.SM4_DECRYPT && (b = this.padding(b, this.SM4_DECRYPT));
for (d = 0; d < b.length; d++)
0 > b[d] && (b[d] += 256);
return b
}
}
(function (a) {
"object" === typeof exports && "undefined" !== typeof module ? module.exports = a() : "function" === typeof define && define.amd ? define([], a) : ("undefined" !== typeof window ? window : "undefined" !== typeof global ? global : "undefined" !== typeof self ? self : this).base64js = a()
})(function () {
return function b(c, d, e) {
function f(h, n) {
if (!d[h]) {
if (!c[h]) {
var t = "function" == typeof require && require;
if (!n && t)
return t(h, !0);
if (g)
return g(h, !0);
n = Error("Cannot find module '" + h + "'");
throw n.code = "MODULE_NOT_FOUND",
n;
}
n = d[h] = {
exports: {}
};
c[h][0].call(n.exports, function (b) {
var d = c[h][1];
return f(d ? d : b)
}, n, n.exports, b, c, d, e)
}
return d[h].exports
}
for (var g = "function" == typeof require && require, h = 0; h < e.length; h++)
f(e[h]);
return f
}({
"/": [
function (b, c, d) {
function e(b) {
var c = b.length;
if (0 < c % 4)
throw Error("Invalid string. Length must be a multiple of 4");
return "\x3d" === b[c - 2] ? 2 : "\x3d" === b[c - 1] ? 1 : 0
}
function f(b, c, d) {
for (var e = [], f = c; f < d; f += 3)
c = (b[f] << 16) + (b[f + 1] << 8) + b[f + 2],
e.push(g[c >> 18 & 63] + g[c >> 12 & 63] + g[c >> 6 & 63] + g[c & 63]);
return e.join("")
}
d.byteLength = function (b) {
return 3 * b.length / 4 - e(b)
};
d.toByteArray = function (b) {
var c, d, f, g, n;
c = b.length;
g = e(b);
n = new w(3 * c / 4 - g);
d = 0 < g ? c - 4 : c;
var l = 0;
for (c = 0; c < d; c += 4)
f = h[b.charCodeAt(c)] << 18 | h[b.charCodeAt(c + 1)] << 12 | h[b.charCodeAt(c + 2)] << 6 | h[b.charCodeAt(c + 3)],
n[l++] = f >> 16 & 255,
n[l++] = f >> 8 & 255,
n[l++] = f & 255;
2 === g ? (f = h[b.charCodeAt(c)] << 2 | h[b.charCodeAt(c + 1)] >> 4,
n[l++] = f & 255) : 1 === g && (f = h[b.charCodeAt(c)] << 10 | h[b.charCodeAt(c + 1)] << 4 | h[b.charCodeAt(c + 2)] >> 2,
n[l++] = f >> 8 & 255,
n[l++] = f & 255);
return n
};
d.fromByteArray = function (b) {
for (var c = b.length, d = c % 3, e = "", h = [], n = 0, l = c - d; n < l; n += 16383)
h.push(f(b, n, n + 16383 > l ? l : n + 16383));
1 === d ? (b = b[c - 1],
e += g[b >> 2],
e += g[b << 4 & 63],
e += "\x3d\x3d") : 2 === d && (b = (b[c - 2] << 8) + b[c - 1],
e += g[b >> 10],
e += g[b >> 4 & 63],
e += g[b << 2 & 63],
e += "\x3d");
h.push(e);
return h.join("")
};
var g = [],
h = [],
w = "undefined" !== typeof Uint8Array ? Uint8Array : Array;
for (b = 0; 64 > b; ++b)
g = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" ,
h["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(b)] = b;
h[45] = 62;
h[95] = 63
}, {}
]
}, {}, [])("/")
});
function Rb(a, b, c) {
var d = new Gc;
d.iv = c;
d.secretKey = b;
return d.encryptData_CBC(a)
}
用v8加密
a={"adBlock":"false","addBehavior":"false","audio":"124.04347527516074","availableScreenResolution":"1880,1200","browserEngine":"Blink","browserName":"Edge","browserVersion":"93.0.961.52","canvas":"SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.","colorDepth":"24","cookieCode":"JiM8uKOzfwyw4AqwbxZ0DWpDzqFyKMTP","cookieEnabled":"1","cpuClass":"not available","custID":"JYZX","deviceMemory":"8","devicePixelRatio":"1","doNotTrack":"unknown","flashVersion":"0","fontsHash":"4902a61a235fbb59700072139347967d","hardwareConcurrency":"8","hasLiedBrowser":"false","hasLiedLanguages":"false","hasLiedOs":"false","hasLiedResolution":"false","indexedDb":"true","isIncognito":"0","isRiskBrowser":"0","isSelenium":"0","javaEnabled":"0","language":"zh-CN","localStorage":"true","mimeTypesHash":"52d67b2a5aa5e031084733d5006cc664","navigatorPlatform":"Win32","openDatabase":"true","os":"Windows","osVersion":"7","platform":"WEB","pluginsHash":"6a0169ef55f16a90ec7f395f27cc64d5","screenResolution":"1920,1200","sessionStorage":"true","timezone":"Asia/Shanghai","timezoneOffset":"-480","touchSupport":"0,false,false","userAgent":"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36 Edg/93.0.961.52","webSmartID":"178ec43dc6e36bcb3e5b8ba365659a96","webdriver":"false","webglHash":"04fd80027eed9a65f41fc04e2f571e94","webglVendorAndRenderer":"Google Inc. (NVIDIA)~ANGLE (NVIDIA, NVIDIA Quadro K3100M Direct3D11 vs_5_0 ps_5_0, D3D11-23.21.13.9135)","hashCode":"1z2_3813NfsLAYr6JQQpZWPJdqzURfJKFqx12Y1K008","algID":"H8hHzyPURF","timestamp":"1674017814894"}