/// <summary>
/// MD5加密,需要引用库文件using System.Security.Cryptography;
/// </summary>
/// <param name="password"></param>
/// <returns></returns>
private string MD5Password(string password)
{
//using System.Security.Cryptography;
MD5CryptoServiceProvider md5Hasher = new MD5CryptoServiceProvider();
byte[] hashedDataBytes;
hashedDataBytes = md5Hasher.ComputeHash(Encoding.GetEncoding("gb2312").GetBytes(password));
StringBuilder tmp = new StringBuilder();
foreach (byte i in hashedDataBytes)
{
tmp.Append(i.ToString("x2"));
}
return tmp.ToString();
}