您的位置:首页 > 编程语言 > Go语言

UnicodeEncoding HashAlgorithm CryptoConfig BitConverter

2006-10-09 17:34 471 查看
using System.Text;
using System.Security.Cryptography;

public static string Encrypt(string password)
{
Byte[] clearBytes=new UnicodeEncoding().GetBytes(password);
Byte[] hashedBytes=((HashAlgorithm)CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes);
return BitConverter.ToString(hashedBytes);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: