/// <summary>
/// 以MD5的方式加密指定字符串
/// </summary>
/// <param name="cleanString"></param>
/// <returns></returns>
public static string Encrypt(string cleanString)
{
Byte[] clearBytes = new UnicodeEncoding().GetBytes(cleanString);
Byte[] hashedBytes = ((HashAlgorithm) CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes);
return BitConverter.ToString(hashedBytes);
}
C#MD5
最新推荐文章于 2024-06-24 19:58:04 发布