Jeffrey Walton <[email protected]> writes:
>> The second is needed to allow lib/u64.h to be included twice as is done
>> in coreutils src/cksum.c (once in sha512.h and once in sha3.h).
>>
>> Tested using a local patch to cksum compared to openssl on a various
>> files.
>
>
> Small nit: what is SHA5-3, as in the comment:
>
> Compute SHA5-3 message digest for bytes ...
That is leftovers from me copying lib/sha512-stream.c and adapting it to
SHA-3. There is some other comments I noticed that were wrong:
/* Process buffer with BLOCKSIZE bytes. Note that
BLOCKSIZE % 128 == 0
*/
sha3_process_block (buffer, BLOCKSIZE, &ctx);
That is the case for SHA-512, but not any of the SHA-3 hashes. In this
case the comment should really be say 'BLOCKSIZE % ctx.blocklen == 0'.
I didn't notice the one you pointed out though. Thanks for mentioning
it.
Collin