static string GetMd5Hash MD5 md5Hash string input byte data md5Hash Co

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
static string GetMd5Hash(MD5 md5Hash, string input)
{
byte[] data = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(input));
StringBuilder sBuilder = new StringBuilder();
for (int i = 0; i < data.Length; i++)
{
sBuilder.Append(data[i].ToString("x2"));
}
return sBuilder.ToString();
}