Quick and Easy MD5 in C#
using System; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; namespace SomeRandomNamespace { class Utils { public static string md5(string strToHash) { MD5CryptoServiceProvider crypt = new MD5CryptoServiceProvider(); byte[] bytes = Encoding.UTF8.GetBytes(strToHash); bytes = crypt.ComputeHash(bytes); System.Text.StringBuilder sb = new System.Text.StringBuilder(); foreach (byte b in bytes) { sb.Append(b.ToString(“x2″).ToLower()); } return sb.ToString(); } } }