标签:pre sys span ring log .text c# byte unicode
1 public static string GetMD5(string myString) 2 { 3 MD5 md5 = new MD5CryptoServiceProvider(); 4 byte[] fromData = System.Text.Encoding.Unicode.GetBytes(myString); 5 byte[] targetData = md5.ComputeHash(fromData); 6 string byte2String = null; 7 8 for (int i = 0; i < targetData.Length; i++) 9 { 10 byte2String += targetData[i].ToString("x"); 11 } 12 13 return byte2String; 14 }
标签:pre sys span ring log .text c# byte unicode
原文地址:http://www.cnblogs.com/zk-zhou/p/6515501.html