On Sun, Jul 01, 2012 at 01:30:08AM +0100, Måns Rullgård wrote:
> Samuel Pitoiset <[email protected]> writes:
[...]
> 
> > +    if (direction) {
> > +        Xr = Xr ^ bf->p[BF_ROUNDS];
> > +        Xl = Xl ^ bf->p[BF_ROUNDS + 1];
> > +    } else {
> > +        Xr = Xr ^ bf->p[1];
> > +        Xl = Xl ^ bf->p[0];
> > +    }
> > +
> > +    *xl = Xl;
> > +    *xr = Xr;
> > +}
> 
> There is practically no code in common between the two directions.  It
> would probably be clearer to simply put the code for each case directly
> in the functions below.

Indeed, sorry for suggesting that in the first place.

[...]
> [...]
> 
> > +/**
> > + * @brief Encrypts using the Blowfish algorithm.
> > + *
> > + * @param bf an AVBlowfish context
> > + * @param xl left eight bytes halves of input to be encrypted
> > + * @param xr right eight bytes halves of input to be encrypted
> > + */
> > +void av_blowfish_encrypt(struct AVBlowfish *bf, uint32_t *xl, uint32_t 
> > *xr);
> 
> Eight bytes where?  uint32_t is four bytes.  Whatever this is trying to
> say, it is confusing.

This function encrypts block of eight bytes passed as two 32-bit integers.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to