/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// using System; // using System.Text; // using System.Security.Cryptography; private string GetHash(string str) { MD5 md5 = MD5CryptoServiceProvider.Create(); byte[] stream = md5.ComputeHash(encoding.GetBytes(str)); for (int i = 0; i < stream.Length; i++) { sb.AppendFormat("{0:x2}", stream[i]); } return sb.ToString(); }