Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. public static string GetMD5Hash(string text)
  2. {
  3.     var md5 = MD5.Create();
  4.     //another way to create and md5 object is new MD5CryptoServiceProvider();
  5.     return md5.ComputeHash(GetBytes(text)).ToHexString();
  6. }
  7.  
  8. private static byte[] GetBytes(string text)
  9. {
  10.     return Encoding.UTF8.GetBytes(text);
  11. }