Code review for 6799258 (small fix)

Dan McDonald danmcd at sun.com
Thu Feb 5 11:24:20 PST 2009


On Thu, Feb 05, 2009 at 07:23:49PM +0100, Ferenc Rakoczi wrote:
> Hi, Hai-May,
> 
>  I have just one obserwation: at the beginning of the file, where
> HASHSIZE  is defined, one gets the impression that it is SHA1
> for now, but later can be changed to something else. In the spirit
> of this, I would use HASHSIZE / sizeof(uint32_t) in the comparison
> (and also in the declaration of the arrays in lines 618 and 619
> of kcf_random.c and line 323 of swrand.c) instead of SHA1WORDS.
> These are constants, so the compiled code will be exactly the same,
> but it shows the connection between the sizes of the arrays and the
> size of the hash.

Yes -- and I apologize, as it was my offline review comment that inspired her
to change it.

I didn't communicate clearly what you just did, Ferenc --> Using '/' with two
constants is more readable but doesn't compile out any worse than using a
plain constant.

Mea culpa,
Dan



More information about the crypto-discuss mailing list