What is the maximum length of the string to be hashed?

I wonder what the maximum length of the string will be hashed?

For example, Hello, world!there is no problem for hash with SHA-1. But what about a string that is longer than 100'000'000 characters? Does it even work? Does this somehow increase the chance of a collision?

Are there any restrictions?

+5
source share
2 answers

Wikipedia shows the maximum message size in bits for SHA-1 as 2 ^ 64-1. So it will be 2 ^ 60-1 unicode characters. In decimal form 1 152 921 504 606 846 975 characters.

Most line language restrictions are 2 GB - 1 character.

​​ , "" . , SHA-1 100 ...

+8

. , . , . ( .) , 100 - , , , . , , , .

, .

+3

All Articles