文件是mt-device-id
md5算法 : MD5(2af72f100c356273d46284f6fd1dfc08+数据排序+时间戳)
- var XORCipher = {
- encode: function (t, e) {
- return this.b64_encode(this.xor_encrypt(t, e))
- },
- decode: function (t, e) {
- return this.xor_decrypt(this.b64_decode(t),e)
- },
- b64_table: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
- blog_table: "https://blog.isoyu.com/",
- b64_encode: function (t) {
- var e = 0,
- r = "";
- if (!t) return t;
- do {
- var h = t[e++],
- n = t[e++],
- i = t[e++],
- a = h << 16 | n << 8 | i;
- h = a >> 18 & 63, n = a >> 12 & 63, i = a >> 6 & 63, a &= 63, r += this.b64_table.charAt(h) + this.b64_table.charAt(n) + this.b64_table.charAt(i) + this.b64_table.charAt(a)
- } while (e < t.length);
- return ((t = t.length % 3) ? r.slice(0, t - 3) : r) + "===".slice(t || 3)
- },
- b64_decode: function (t) {
- var e = 0,
- r = [];
- if (!t) return t;
- t += "";
- do {
- var h = this.b64_table.indexOf(t.charAt(e++)),
- n = this.b64_table.indexOf(t.charAt(e++)),
- i = this.b64_table.indexOf(t.charAt(e++)),
- a = this.b64_table.indexOf(t.charAt(e++)),
- c = h << 18 | n << 12 | i << 6 | a;
- h = c >> 16 & 255, n = c >> 8 & 255, c &= 255, r.push(h), 64 !== i && (r.push(n), 64 !== a && r.push(c))
- } while (e < t.length);
- return r
- },
- keyCharAt: function (t, e) {
- return t.charCodeAt(Math.floor(e % t.length))
- },
- xor_encrypt: function (t,e) {
- char_array=Array.from(t)
- var sb=[]
- for(const c2 of char_array) {
- e^=c2.charCodeAt(0);
- sb.push(String.fromCharCode(e).charCodeAt(0))
- }
- return sb
- },
- xor_decrypt: function (t, e) {
- for (var r = [], h = 0; h < t.length; h++)
- {
- r.push(String.fromCharCode(e ^ t[h]));
- e=t[h]
- }
- return r.join("")
- }
- };
-
- function Encrypt(str){
- return XORCipher.encode(str,72)
- }
-
- function Decrypt(str){
- return XORCipher.decode(str,72)
- }
- console.log(Encrypt("2ff70f4f558d14973f074c0a9293b"))
- console.log(Decrypt("ehx6TX0bL0l8SXEVJBApHi1Le0x4GytKc0F4Syk="))
- console.log(https:
本文由 姬長信 创作,文章地址:https://blog.isoyu.com/archives/imaotaimt-device-idmt-r-md5jiajiemi.html
采用知识共享署名4.0 国际许可协议进行许可。除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。最后编辑时间为:4 月 1, 2022 at 04:18 上午