标签:int encoding ice name byte ret span ram padleft
/// <summary> /// 32位MD5加密 /// </summary> /// <param name="input"></param> /// <returns></returns> public static string Md5Hash(string input) { MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] bytValue, bytHash; bytValue = System.Text.Encoding.UTF8.GetBytes(input); bytHash = md5.ComputeHash(bytValue); md5.Clear(); string sTemp = ""; for (int i = 0; i < bytHash.Length; i++) { sTemp += bytHash[i].ToString("X").PadLeft(2, ‘0‘); } return sTemp.ToLower(); }
标签:int encoding ice name byte ret span ram padleft
原文地址:http://www.cnblogs.com/tangchun/p/6950912.html