//转化后的MD5加密
using System.Text;
using System.Security.Cryptography;
public static string MD5(string psd)
{
MD5CryptoServiceProvider MD5CSP = new MD5CryptoServiceProvider();
byte[] MD5Source = System.Text.Encoding.UTF8.GetBytes(psd);
byte[] MD5Out = MD5CSP.ComputeHash(MD5Source);
StringBuilder sBuilder = new StringBuilder();
for (int i = 0; i < MD5Out.Length; i++)
{
sBuilder.Append(MD5Out[i].ToString("x2"));//转化为16进制的数
}
return sBuilder.ToString();
}