recommended way to get file checksum
Hi, I am creating an application that needs to get checksums for files. The code currently looks like this:
This is fairly though. A ~1GB file will take around 3 minutes to generate a checksum with the code above, whereas the built in linux utility
sha256sum
can do the same in 2.5 seconds. Parallelizing this isnt straightforward to me though, since the hash update is blocking1 Reply
The Web Crypto API does not seem to support streaming files in, and if you aren't consistent with the chunk sizes by rehashing for a readable manner, then you will get different results each time.