Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
开发者_高级运维 Improve this questionWhat is the most comprehensive MD5 tutorial out there? I have been trying to implement a decent MD5 checksum program but I have not come across a tutorial that makes it really clear.
Any pointers would be appreciated, Thanks.
To clarify I would like to know how to implement it.
There's some explanation and pseudo-code of implementation on Wikipedia
Nothing easier than that. The following method will convert a given string and return the MD5 Hash of it.
public static string MD5Hash(string text)
{
System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
return System.Text.RegularExpressions.Regex.Replace(BitConverter.ToString(md5.ComputeHash(ASCIIEncoding.Default.GetBytes(text))), “-”, “”);
}
精彩评论