Can SHA-1 algorithm be computed on a stream? With low memory footprint?

Posted by raoulsson on Stack Overflow See other posts from Stack Overflow or by raoulsson
Published on 2010-03-22T21:44:22Z Indexed on 2010/03/22 21:51 UTC
Read the original article Hit count: 268

Filed under:
|
|
|
|

I am looking for a way to compute SHA-1 checksums of very large files without having to fully load them into memory at once.

I don't know the details of the SHA-1 implementation and therefore would like to know if it is even possible to do that.

If you know the SAX XML parser, then what I look for would be something similar: Computing the SHA-1 checksum by only always loading a small part into memory at a time.

All the examples I found, at least in Java, always depend on fully loading the file/byte array/string into memory.

If you even know implementations (any language), then please let me know!

© Stack Overflow or respective owner

Related posts about sha1

Related posts about memory