📅  最后修改于: 2022-03-11 14:48:39.934000             🧑  作者: Mango
public static string encode(string text)
{
byte[] mybyte = System.Text.Encoding.UTF8.GetBytes(text);
string returntext = System.Convert.ToBase64String(mybyte);
return returntext;
}
public static string decode(string text)
{
byte[] mybyte = System.Convert.FromBase64String(text);
string returntext = System.Text.Encoding.UTF8.GetString(mybyte);
return returntext;
}