C# SHA1散列算法
/// <summary> /// C# SHA1散列算法 /// </summary> /// <param name="str"></param> /// <returns></returns> public static string EncryptToSHA1(string str) { byte[] cleanBytes = Encoding.Default.GetBytes(str); byte[] hashedBytes = System.Security.Cryptography.SHA1.Create().ComputeHash(cleanBytes); return BitConverter.ToString(hashedBytes).Replace("-", ""); }