/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static string MD5(string password) { byte[] textBytes = System.Text.Encoding.Default.GetBytes(password); try { System.Security.Cryptography.MD5CryptoServiceProvider cryptHandler; byte[] hash = cryptHandler.ComputeHash(textBytes); string ret = ""; foreach (byte a in hash) { ret += a.ToString("x2"); } return ret.ToUpper(); ; } catch { throw; } }
URL: http://www.spiration.co.uk/post/1203/MD5%20in%20C%23%20-%20works%20like%20php%20md5%28%29%20example