[C#] 纯文本查看 复制代码
/// <summary>
/// 字符串转Base64编码
/// </summary>
/// <param name="Context">需要加密的内容</param>
/// <returns></returns>
public static string EncryptionBase64Context(string context)
{
byte[] byteArray = System.Text.Encoding.Default.GetBytes(context);
string content = Convert.ToBase64String(byteArray);
return content;
}