public string HashMD5(string input,bool isLower){
byte[] bin, bout;
System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create();
bin = System.Text.Encoding.Default.GetBytes(input);
bout = md5.ComputeHash(bin);
System.Text.StringBuilder sb = new StringBuilder(16);
for (int i = 0; i < bout.Length; i++)
{
sb.Append(bout[i].ToString("X2", System.Globalization.CultureInfo.InvariantCulture));
}
string s;
if (isLower)
s = sb.ToString().ToLower();
else
s = sb.ToString().ToUpper();
md5.Clear();
return s;
}