bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arcfour


From: Ralf Wildenhues
Subject: Re: arcfour
Date: Fri, 14 Oct 2005 16:01:23 +0200
User-agent: Mutt/1.5.11

* Simon Josefsson wrote on Fri, Oct 14, 2005 at 03:57:43PM CEST:
> Ralf Wildenhues <address@hidden> writes:
> 
> > Furthermore, if I may suggest not to sprinkle hard-coded numbers all
> > over the place.  How about something like this
> >   #define ARCFOUR_BLOCKBITS 8
> >   #define ARCFOUR_BLOCKSIZE (1 << ARCFOUR_BLOCKBITS)
> >   #define ARCFOUR_BLOCKMASK (ARCFOUR_BLOCKSIZE - 1)
> 
> Wasn't that backwards?  Shouldn't it be:
> 
>    #define ARCFOUR_BLOCK_SIZE 8
>    #define ARCFOUR_BLOCK_BITS (1 << ARCFOUR_BLOCKSIZE)
>    #define ARCFOUR_BLOCK_MASK (ARCFOUR_BLOCKBITS - 1)
> 
> ?
> 
> Symbols called *SIZE are usually measured in bytes.

Come to think of it, I'd probably call the first one LOGSZ
(or LOGSIZE, FWIW), and the second SIZE.  Calling the second
BITS sounds wrong to me, nothing here has 256 bits.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]