64位编码译码 encode decode

64位编译反编译 ,js编译也可用后台解除。用于传值特殊符号造成的问题

public static string Base64Encode(string plainText) {
var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
return System.Convert.ToBase64String(plainTextBytes);
}


Base64.encode(vExportContent)


public static string Base64Decode(string base64EncodedData) {
var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
}



[url]http://stackoverflow.com/questions/11743160/how-do-i-encode-and-decode-a-base64-string[/url]

你可能感兴趣的:(Javascript,C#)