using System.Text
using System.Security.Cryptography;
string md5string=“123456”;
MD5 md5 = new MD5CryptoServiceProvider();
byte[] bytes1 = Encoding.UTF8.GetBytes(md5string);
byte[] bytes2 = md5.ComputeHash(bytes1);
string md5result = "";
for (int i = 0; i < bytes2.Length; i++)
{
md5result += bytes2[i].ToString("x2");
}
Console.WriteLine(md5result );
这里的结果为
标签:加密,md5result,c#,System,md5string,bytes2,byte,MD5 From: https://www.cnblogs.com/sqqswdg19/p/17170267.html