public static string GetMD5Hash(string text)
{
var md5 = MD5.Create();
//another way to create and md5 object is new MD5CryptoServiceProvider();
return md5.ComputeHash(GetBytes(text)).ToHexString();
}
private static byte[] GetBytes(string text)
{
return Encoding.UTF8.GetBytes(text);
}