字符串md5加密
[csharp]/// <summary>
/// 字符串md5加密
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
public static string StrToMD5(string str)
{
byte[] result = Encoding.Default.GetBytes(str.Trim());
MD5 md5 = new MD5CryptoServiceProvider();
byte[] output = md5.ComputeHash(result);
return BitConverter.ToString(output).Replace("-", "");
}
补充:软件开发 , C# ,