top | item 45947660

The Challenge of Large File Checksums

8 points| I_like_tomato | 3 months ago |ppppp.dev

5 comments

order

BobbyTables2|3 months ago

I don’t understand the goal here.

Splitting a file into chunks, hashing them in parallel, and then hashing the resulting hashes is certainly a valid method but not the same as hashing a file the traditional way.

Unless the world changes how they publish hashes of files available for download, I don’t see the point.

I_like_tomato|3 months ago

The reasoning here is to improve getting hash of a large file (let say size > 100GB). Reading the file content sequently and hashing it will take a lot longer

dabiged|3 months ago

Why not use a faster hashing algorithm like xxhash?

This code is using sha256 which, whilst cryptography secure, is a massive burden for computation.

I_like_tomato|3 months ago

yup, I agree. I should update it to use a faster hashing algorithm. That is the next step