let keyStr = 'J8QoS9q62O4cnMVvkemfCdXE_-l3abjzRiHAP7uwFLZB0Ir=pKGxN5sgtYTWDy1hU';
encodeFuc = function (input) {
    let output = "", chr1, chr2, chr3, enc1, enc2, enc3, enc4, i = 0;
    input = utf8_encode(input);
    while (i < input.length) {
        chr1 = input.charCodeAt(i++);
        chr2 = input.charCodeAt(i++);
        chr3 = input.charCodeAt(i++);
        enc1 = chr1 >> 2;
        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
        enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
        enc4 = chr3 & 63;
        if (isNaN(chr2)) {
            enc3 = enc4 = 64;
        } else if (isNaN(chr3)) {
            enc4 = 64;
        }
        console.log(enc1, enc2, enc3, enc4)
        output = output +
            keyStr.charAt(enc1) + keyStr.charAt(enc2) +
            keyStr.charAt(enc3) + keyStr.charAt(enc4);
    }
    return output;
}
utf8_encode = function (string) {
    string = string.replace(/\r\n/g, "\n");
    let utftext = "";
    for (let n = 0; n < string.length; n++) {
        let c = string.charCodeAt(n);
        if (c < 128) {
            utftext += String.fromCharCode(c);
        } else if ((c > 127) && (c < 2048)) {
            utftext += String.fromCharCode((c >> 6) | 192);
            utftext += String.fromCharCode((c & 63) | 128);
        } else {
            utftext += String.fromCharCode((c >> 12) | 224);
            utftext += String.fromCharCode(((c >> 6) & 63) | 128);
            utftext += String.fromCharCode((c & 63) | 128);
        }

    }
    return utftext;
}
// 编码

decodeFuc = function (input) {
    let output = "", chr1, chr2, chr3, enc1, enc2, enc3, enc4, i = 0;
    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
    let res = [];
    while (i < input.length) {
        enc1 = keyStr.indexOf(input.charAt(i++));
        enc2 = keyStr.indexOf(input.charAt(i++));
        enc3 = keyStr.indexOf(input.charAt(i++));
        enc4 = keyStr.indexOf(input.charAt(i++));
        chr1 = (enc1 << 2) | (enc2 >> 4);
        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
        chr3 = ((enc3 & 3) << 6) | enc4;
        output = output + String.fromCharCode(chr1);
        res.push(chr1)
        if (enc3 != 64) {
            output = output + String.fromCharCode(chr2);
            res.push(chr2)
        }
        if (enc4 != 64) {
            output = output + String.fromCharCode(chr3);
            res.push(chr3)

        }
    }
    console.log(res)
    output = utf8_decode(output);
    return output;
}
utf8_decode = function (utftext) {
    let string = "", i = 0, c = 0, c1 = 0, c2 = 0, c3 = 0;
    while (i < utftext.length) {
        c = utftext.charCodeAt(i);
        if (c < 128) {
            string += String.fromCharCode(c);
            i++;
        } else if ((c > 191) && (c < 224)) {
            c2 = utftext.charCodeAt(i + 1);
            string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
            i += 2;
        } else {
            c2 = utftext.charCodeAt(i + 1);
            c3 = utftext.charCodeAt(i + 2);
            string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
            i += 3;
        }
    }
    return string;
}
// 解码
newBase =  'm_NX78dBPXDKNk5hmNitMGipEdI-MatWtjIAhkijtxcg-sXWqvve7magQjrmAB-JX08sN99BkZpGxI5TgOLkhe=pnBSPATif0_8JGYyfQqh1zQK5gmZQF0gPjZ71VDJ1DZIYgMhqd1h1jAi-tpn00J1YipRTI_jTF8IYcNK_LGDxMape_t8-csH2FAt7uc8piOmV-PC9sGFvEV8bIJGVk7fOow433Ffeb8zoBqp8KMpdSOYguGF_DrW4xDzGtE_DNHtnYVuvuKv=6RsCSWFh0GrgLguW3YH-06C8mZ=kO9QD3m-3M3=KcudK_go-CZp-H1fXxWMPXQvm==WiY4fYI2hrb5br7Ox-vjn-0FaCKaeT_rL6fS_I5yYw728X3STwn__W49rPCHLCu7RNj1nVv3IulrOs3uyV8xRojMdvBV9htEV0wAXS0iSiVe7fjZJyIHAbhI7-joPQ5wxw8u9PbT8GnQNCihZORoThYIBzw_QCf=LKr=J3LuFfksYzDbDQa5jiQLsDhzsvzGIyfWOyYaaxXHtT4dYjHApoS1OQrg5GwPcxegBZMc2IthpnY2l1cqpsyPh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

console.log(newBase)
// console.log(oldValue)


let res = []

let b = 'A97nfY-IAQAAqoWs8TokCGd4ge9wiJWEtTySE7C1pLSDjEe4tzAzwKGvkJ2QASZebdKucn0ewH9eCOfvosJeCA=='
for (let i = 0; i < b.length; i+=2) {
    let n1 = b.charCodeAt(i)
    let n2 = b.charCodeAt(i+1)
    // console.log(n1,n2, n1 << 16 | n2 )
    res.push(n1 << 16 | n2)
}
console.log(res+'')

// [1, 147,  50, 194, 204, 152, 180, 131,  64, 139, 170, 159,
//    46, 137, 179, 160,  78,  52,  56, 134,  92,  98, 147, 111,
//   123,  77, 164, 251, 144, 151,  64,  45,   8, 210,  16, 122,
//    64,  39, 236, 209, 135, 245, 192, 100, 251, 158,  99,  49,
//    29,  36, 242,  67, 233,  33, 229,  27, 255,  50,  12,  67,
//   159, 152, 223,  17, 105,  12, 244,  75,  37, 131, 161,  32,
//    83, 215,  54, 120, 190,  29, 152, 148, 203, 176, 156, 226,
//   101, 174, 220, 184, 116,  84, 173,  23,  77, 169, 244,  41,
//   215, 201,  63,  87]
//
//
// [
//    1891353754, 1035793960,
//   -1062579495,  971497754,
//    2047861029,  453967604,
//    1188017424,  886685092,
//    1231819529,  845208169,
//     104545809, 2142949960,
//    2967616560,    1004220,
//      26424002, -862407549
// ]
