标签:style blog color os for div ar new
/// <summary> /// Sha1 /// </summary> /// <param name="str"></param> /// <returns></returns> public static string Sha1(string str) { byte[] strres = Encoding.Default.GetBytes(str); HashAlgorithm isha = new SHA1CryptoServiceProvider(); strres = isha.ComputeHash(strres); StringBuilder EnText = new StringBuilder(); foreach (byte item in strres) { EnText.AppendFormat("{0:x2}", item); } return EnText.ToString(); }
/// <summary> /// Sha1 /// </summary> /// <param name="str"></param> /// <returns></returns> public static string Sha1(string str) { byte[] strres = Encoding.Default.GetBytes(str); HashAlgorithm isha = new SHA1CryptoServiceProvider(); strres = isha.ComputeHash(strres); StringBuilder EnText = new StringBuilder(); foreach (byte item in strres) { EnText.AppendFormat("{0:x2}", item); } return EnText.ToString(); }
标签:style blog color os for div ar new
原文地址:http://www.cnblogs.com/Evaniko/p/3872656.html