asp.net 2.0中md5密码加密

 1using System.Text;
 2using System.Security.Cryptography;
 3
 4//密码加密
 5public static string Encrypt(string password)
 6{
 7    password = password.ToLower();
 8
 9    Byte[] clearBytes = new UnicodeEncoding().GetBytes(password);
10    Byte[] hashedBytes = ((HashAlgorithm)CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes);
11
12    return BitConverter.ToString(hashedBytes);
13}

原文地址:https://www.cnblogs.com/timy/p/863656.html