using System.Security.Cryptography;
private static string MD5ToString(String argString)
{
MD5 md5 = new MD5CryptoServiceProvider();
byte[] data = System.Text.Encoding.Default.GetBytes(argString);
byte[] result = md5.ComputeHash(data);
String strReturn = String.Empty;
for (int i = 0; i < result.Length; i++)
strReturn += result[i].ToString("x").PadLeft(2, '0');
return strReturn;
}
返回的结果就是经md5加密后的结果了!