-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
35 lines (32 loc) · 781 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var Bb = "FZMÛSê/·V«xÞhí¢³4<`ô2ª,µ¦Yû";
function Fb(a) {
var b;
var c = unescape(encodeURIComponent(JSON.stringify(a)));
var d = [];
var e = 0;
var f = "";
for (var g = 0; g < 256; g++) {
d[g] = g;
}
for (var h = 0; h < 256; h++) {
e = (e + d[h] + Bb.charCodeAt(h % Bb.length)) % 256;
b = d[h];
d[h] = d[e];
d[e] = b;
}
var j = 0;
e = 0;
for (var l = 0; l < c.length; l++) {
e = (e + d[j = (j + 1) % 256]) % 256;
b = d[j];
d[j] = d[e];
d[e] = b;
f += String.fromCharCode(c.charCodeAt(l) ^ d[(d[j] + d[e]) % 256]);
}
return Buffer.from(f).toString('base64')
}
Fb({
a: 1,
b: 2,
c: 3
}) // Encryption input is always an object