Comment 81 for bug 1085526

Revision history for this message
In , Adam Reichold (adamreichold) wrote :

(In reply to Andre Guerreiro from comment #76)
> Created attachment 118745 [details] [review]
> Incremental hashing + large file support
>
> With this patch I've implemented the incremental hashing plus the large file
> support.
>
> This is still untested with files larger than 2GB but is correct for all the
> regular test cases I gathered before.

Some minor suggestions:

* The naming of BLOCK_SIZE and block_len in hashSignedDataBlock seems misleading to me, maybe CHUNK_SIZE and block_len?

* The method hashSignedDataBlock could probably be replaced by a static function taking the stream and the handler? This should give the compiler more optimization possibilities than if it is visible in other translation units.

* I think the while loop within could become a for loop for better readability with the case reduced to computing the number of bytes to read instead of two separate calls to doGetChars and updateHash.