public static string MD5String(string value)
{
System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
byte[] data = Encoding.Default.GetBytes(value);
byte[] md5Data = md5.ComputeHash(data);
md5.Clear();
string result = "";
for (int i = 0; i < md5Data.Length; i++)
{
result += md5Data[i].ToString("x").PadLeft(2, '0');
}
return result;
}