4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);functon bse64encode(str) {vr out, , len;vr c1, c2, c3;len
str.length;
0;out
””;whle ( > 2);out +
bse64encodechrs.chrat((c1 & 0x3)2);out +
bse64encodechrs.chrat(((c1 & 0x3)4));out +
bse64encodechrs.chrat((c2 & 0xf)2);out +
bse64encodechrs.chrat(((c1 & 0x3)4));out +
bse64encodechrs.chrat(((c2 & 0xf)6));out +
bse64encodechrs.chrat(c3 & 0x3f);}returut;}functon bse64decode(str) {vr c1, c2, c3, c4;vr , len, out;len
str.length;
0;out
””;whle (4));do {c3
str.chrcodeat(++) & 0xff;f (c3 ![](/zi/j1.png)
61) returut;c3
bse64decodechrs[c3];} whle (2));do {c4
str.chrcodeat(++) & 0xff;f (c4 ![](/zi/j1.png)
61) returut;c4
bse64decodechrs[c4];} whle ( > 12) & 0x0f));out +
strg.fromchrcode(0x80 | ((c >> 6) & 0x3f));out +
strg.fromchrcode(0x80 | ((c >> 0) & 0x3f));} else {out