改写这是代码PLZ帮我感谢我怎么能写MD5 .NET在PHP
public static string CalculateMD5Hash(string strInput)
{
MD5 md5 = System.Security.Cryptography.MD5.Create();
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(strInput);
byte[] hash = md5.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hash.Length; i++)
{
sb.Append(hash[i].ToString("x2"));
}
return sb.ToString();
}
如果你想获得md5在php中,你可以用'md5()' –
['md5()'](http://php.net/md5)怎么回事? – Maerlyn