
Hi Lukasz,
On 7 May 2014 06:57, Lukasz Majewski l.majewski@samsung.com wrote:
The current approach set the initial value of crc32 calculation to zero, which is correct for calculating checksum of the whole chunk of data.
It however, lacks the flexibility, when one wants to calculate CRC32 of a file comprised of many smaller parts received separately.
In the proposed approach the output value is used as a starting condition for the proper crc32 calculation at crc32_wd function. This behavior is identical to the one provided by crc32() method implementation.
Additionally comments were appropriately updated.
Maybe I am missing something, but this doesn't seem necessary. In hash.h we have
hash_init() hash_update() hash_finish()
which permits you to pass more data through a hash function. Doesn't this already do what you want?
What is missing is probably command-line access to this API. Something like:
hash init <envvar>, <algo> hash update <envvar>, <data>, <size> hash finish <envvar>, [*]<result>
or similar.
Regards, Simon