C#哈希 [英] C# hashes
本文介绍了C#哈希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是新的C#
- 我如何哈希用C#文件
- 可怎么办? (MD5,CRC,SHA1等)
- 有一个界面,我应该继承?
块引用>
基本上我要校验多个文件,并将其存储在一个数据库使用两个我自己的校验/哈希一起。
解决方案
1。)我怎样哈希用C#文件?
块引用>
您可以利用下的 System.Security.Cryptography
2),可怎么办?
块引用>
- KeyedHashAlgorithm
- MD5
- RIPEMD160
- SHA1
- SHA256
- SHA384
- < A HREF =http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha512.aspx> SHA512
3。)是否有一个界面,我应该继承?
块引用>
不,你不必。
看看 HashAlgorithm.Create(...)I'm new to C#
- How do i hash files with C#
- What is available ? (md5, crc, sha1, etc)
- Is there an interface i should inherit?
Basically i want to checksum multiple files and store it in a db along with using two of my own checksums/hashes.
解决方案1.) How do i hash files with C#?
You can utilize .NET classes under System.Security.Cryptography
2.) What is available?
3.) Is there an interface i should inherit?
No you don't have to. Take a look at HashAlgorithm.Create(...)
这篇关于C#哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文