c# md5 函数 加密 c# md5 函数 加密 using System.Security.Cryptography; Code 1 public string md5(string str) 2 { 3 MD5 m = new MD5CryptoServiceProvider(); 4 byte[] s = m.ComputeHash(UnicodeEncoding.UTF8.GetBytes(str)); 5 return BitConverter.ToString(s); 6 }