哈希值有多大? [英] How large can a hash value be?
本文介绍了哈希值有多大?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我和我办公室的一位程序员进行了讨论.您可以散列多少数据是否有任何限制?哈希算法有很多不同,但是我们使用SHA-1和SHA-2
我可以哈希(理论上)100 GB的值吗?还是1 PB?
I ran into a discussion with one of the programmers at my office. Is there any limitations for how much data you can hash? There''s a lot of different algorithms for hashing, but we use SHA-1 and SHA-2
Can I hash (in theory) a value of 100 gigabyte? or 1 petabyte?
推荐答案
再进行一次谷歌搜索,我找到了答案.
最大输入大小=(2 length − 1)位.例如,SHA-1的最大输入大小=(2 64 − 1).
SHA-384和SHA-512的最大输入大小为(2 128 -1)
参考: http://en.wikipedia.org/wiki/Comparison_of_cryptographic_hash_functions [
A little more googling and I found the answer.
The maximum input size = (2length − 1) bits. For example, the maximum input size of SHA-1 = (264 − 1).
SHA-384 and SHA-512 has a maximum input size of (2128 - 1)
ref: http://en.wikipedia.org/wiki/Comparison_of_cryptographic_hash_functions[^]
这篇关于哈希值有多大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文