在C#中SHA1散列大文件(超过2GB) [英] Hash SHA1 large files (over 2gb) in C#

查看:940
本文介绍了在C#中SHA1散列大文件(超过2GB)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在找的散列大文件内容的解决方案(文件可能超过2GB的32位操作系统)。它有没有任何简单的解决方案?或只是部分读取并加载到缓冲区?


解决方案

Driis的解决方案听起来更灵活,但<一href=\"http://msdn.microsoft.com/en-us/library/xa627k19.aspx\"><$c$c>HashAlgorithm.ComputeHash也将接受取值作为参数。<​​/ P>

I`m looking for solution for hashing large file content (files may be over 2gb in 32bit os). It there any easy solution for that? Or just reading by part and loading to buffer?

解决方案

Driis's solution sounds more flexible, but HashAlgorithm.ComputeHash will also accept Streams as parameters.

这篇关于在C#中SHA1散列大文件(超过2GB)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆