[FFmpeg-devel] libavutil: Added twofish block cipher

Michael Niedermayer michaelni at gmx.at
Thu Jan 29 02:16:09 CET 2015


On Wed, Jan 28, 2015 at 04:06:19PM +0100, Giorgio Vazzana wrote:
> 2015-01-27 22:01 GMT+01:00 supraja reddy <supraja0493 at gmail.com>:
> > Hello,
> >
> >> +    for (i = 0; i < cs->ksize; i++) {
> >> > +        Me[i] = Key[2 * i];
> >> > +        Mo[i] = Key[2 * i + 1];
> >> > +    }
> >> > +    for (i = 0; i < cs->ksize; i++)
> >> > +        cs->S[cs->ksize - i - 1] = tf_RS(Me[i], Mo[i]);
> >>
> >> Can't the previous two for loops be merged together?
> >>
> >>
> > You wanted me to divide the two sets earlier so I had split them up. I have
> > merged them now anyways.
> 
> OK :) , at least you're using only one variable for the loop (i) now
> and not two (i, j).
> 
> >
> >
> >> > +/**
> >> > +  * Initialize an AVTWOFISH context.
> >> > +  *
> >> > +  * @param ctx an AVTWOFISH context
> >> > +  * @param key a key of size ranging from 1 to 32 bytes used for
> >> encryption/decryption
> >> > +  * @param key_bits number of keybits: 128, 192, 256 If less than the
> >> required, padded with zeroes to nearest valid value
> >> > + */
> >>
> >> You need to document the return values of this function.
> >>
> >
> > I hope the documentation is proper and as requested.
> 
> I meant document the return value using @return, but we can fix it
> after we apply the patch.
> 

> The rest LGTM, thanks.

applied
thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150129/04144fa5/attachment.asc>


More information about the ffmpeg-devel mailing list