This is my code:
private static string ComputeMD5Hash(string input)
{
using (MD5 md5 = MD5.Create())
{
byte[] inputBytes = Encoding.Default.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hashBytes.Length; i++)
{
sb.Append(hashBytes[i].ToString("x2"));
}
return sb.ToString();
}
}
The result MD5 from my code is: "91c8798099fac8762bb0e014084a3f08".
The result MD5 from online tool is: "8bb25958e7b1caad4a3be362d6098d76".
So, what the problem here? Why I can't get the same result I use .NET 5.