C# xml报文摘要计算

0
C# IDE XML C/C++ 1479 次浏览

public static string EncryptToSHA1(string str)
{
SHA1CryptoServiceProvider sha1 = new SHA1CryptoServiceProvider();
byte[] str1 = Encoding.UTF8.GetBytes(str);
byte[] str2 = sha1.ComputeHash(str1);
sha1.Clear();
(sha1 as IDisposable).Dispose();
return Convert.ToBase64String(str2);
}这个方法用来计算摘要值是否正确?   另外能否给个简单的报文并给出其摘要值····

请尽量让自己的答案能够对别人有帮助

2个答案

默认排序 按投票排序
0

The things you give are very convincing, I have read it many times and feel very logical. This is my own opinion, but many people may not be like that, but I hope you continue to develop to have more similar articles.
mutilate a doll 2 unblocked

0

This is utterly surprising; why aren't we paying more attention to this thing? resident evil net