110,538
社区成员
发帖
与我相关
我的任务
分享
_base1KeyStr="ABCDEFGHIJKLMDHDGSY"
function encode(a) {
var f = "", b, c, d, e, g, n, l = 0;
for (a = (a); l < a.length; )
b = a.charCodeAt(l++),
c = a.charCodeAt(l++),
d = a.charCodeAt(l++),
e = b >> 2,
b = (b & 3) << 4 | c >> 4,
g = (c & 15) << 2 | d >> 6,
n = d & 63,
isNaN(c) ? g = n = 64 : isNaN(d) && (n = 64),
f = f + _base1KeyStr.charAt(e) + _base1KeyStr.charAt(b) + _base1KeyStr.charAt(g) + _base1KeyStr.charAt(n);
return f
}
string s = "qwertyuiopasdfghjklzxcvbnm";
Console.Write(Convert.ToBase64String(Encoding.UTF8.GetBytes(s)));
Console.ReadKey();