SHA1CryptoServiceProvider sha1 = new SHA1CryptoServiceProvider();
byte[] str1 = Encoding.UTF8.GetBytes(DecryptString);
byte[] str2 = sha1.ComputeHash(str1);
sha1.Clear();
(sha1 as IDisposable).Dispose();
return Convert.ToBase64String(str2);
参考:http://www.cnblogs.com/Bobdong/p/5254147.html
谢谢,已经解决了