var aaa = [23, 14, 6, 36, 16, 40, 7, 19];
var bbb = [16, 1, 32, 12, 19, 27, 8, 5];
var ccc = [
89, 39, 179, 150, 218, 82, 58, 252, 177, 52, 186, 123, 120, 64, 242, 133, 143,
161, 121, 179,
];
var string_to_num = {
0: 0,
1: 1,
2: 2,
3: 3,
4: 4,
5: 5,
6: 6,
7: 7,
8: 8,
9: 9,
A: 10,
B: 11,
C: 12,
D: 13,
E: 14,
F: 15,
};
var b64str =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var data_Sha1 = "e3b7e88c5178c77fec1228baf2d8515f81e8809e".toUpperCase();
var stra = aaa
.map((x) => {
return data_Sha1.charAt(x);
})
.join("");
console.log("first", stra);
var strb = bbb
.map((x) => {
return data_Sha1.charAt(x);
})
.join("");
console.log("last", strb);
var result_arr = [];
for (let i = 0; i < 2 * ccc.length; i++) {
var a1 = data_Sha1[i],
a2 = data_Sha1[i + 1],
b1 = string_to_num[a1],
b2 = string_to_num[a2],
c = ccc[i / 2],
result = (b1 * 16) ^ b2 ^ c;
result_arr.push(result);
i++;
}
console.log(result_arr);
console.log(result_arr.length);
console.log(String.fromCharCode(...result_arr));
// /[+=]+$/
var str_medium = btoa(String.fromCharCode(...result_arr)).replace(
/\+|=+$/g,
""
);
console.log("str_medium", str_medium.toLowerCase());
result_str = ("zzc" + stra + str_medium + strb).toLowerCase();
console.log(result_str);