引用
using System.Security.Cryptography;
using System.Text;
具体代码如下:
byte[] result = Encoding.Default.GetBytes(string a);
MD5 md5 = new MD5CryptoServiceProvider();
byte[] output = md5.ComputeHash(result);
string b = BitConverter.ToString(output).Replace("-","");