Key place, process from byte to string
Here is an error!
/ ** /
///
public
String
GetHexmd5String
String
STRVALUE
{String Strreturn = ""; byte [] data = encoding.unicode.getbytes; md5 md5 = md5cryptoserviceProvider.create (); md5.computehash (data); // The following is a problem from byte to string! For (INT i = 0; I The result of the settlement is encrypted, writing Java, PHP, ASP and other standard algorithms! In fact, there is a method of the simplest implementation of MD5 in .NET. / ** / /// public Static String MD5 String TocryString) {Return Formsauthentication.hashPasswordforstoringInConfigfile (TocryString, "MD5"); So, how can I turn from byte to a string? I saw, QuickStart used it. Bitconverter.tostring This standard MD5 is written! public Static String MD5 String TocryString) {MD5CryptoServiceProvider hashmd5; hashmd5 = new MD5CryptoServiceProvider (); return BitConverter.ToString (hashmd5.ComputeHash (Encoding.Default.GetBytes (toCryString))) Replace ( "-", "") ToLower ();.. // asp lowercase , Change all characters lowercase} The result is encrypted, and the same is the same as the standard!