sha1加密

SHA1CryptoServiceProvider sha1 = new SHA1CryptoServiceProvider();
                byte[] str1 = System.Text.Encoding.UTF8.GetBytes(str);
                byte[] hash = sha1.ComputeHash(str1);
                sha1.Clear();
                (sha1 as IDisposable).Dispose();

原文地址:https://www.cnblogs.com/DTWolf/p/4645616.html