[FFmpeg-devel] [PATCH] SHA-256 support

Kostya kostya.shishkov
Tue Jun 9 07:13:40 CEST 2009


On Mon, Jun 08, 2009 at 08:07:14PM +0200, Diego Biurrun wrote:
> On Mon, Jun 08, 2009 at 08:34:37PM +0300, Kostya wrote:
> > $subj, I'll need that for RTMP
> > This implementation is made from code by Aaron D. Gifford and
> > lavu/sha1.c
> > Conformance vectors are passed on both endian architectures.
> 
> > #ifndef AVUTIL_SHA1_H
> > #define AVUTIL_SHA1_H
> 
> This is not the filename.

Oops, fixed

> > static void transform(uint32_t state[5], const uint8_t buffer[64]){
> 
> extra good karma for K&R function declarations
> 
> >     for( i = 0; i < len; i++ ){
> >         ctx->buffer[ j++ ] = data[i];
> >         if( 64 == j ){
> 
> You inconsistently format all those if/for statements throughout the
> file.  I suggest sticking to K&R style, which you already use in most
> places.

Ahem, I consistently copypaste code from other parts of ffmpeg (in this
case source is libavutil/sha1.c).
 
> > #ifdef TEST
> > #include <stdio.h>
> > #undef printf
> 
> Add this file to the list of testprogs in the Makefile.

done

> Diego
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sha2.patch
Type: text/x-diff
Size: 612 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090609/eba1e5db/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sha2.h
Type: text/x-chdr
Size: 1158 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090609/eba1e5db/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sha2.c
Type: text/x-csrc
Size: 6028 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090609/eba1e5db/attachment.c>



More information about the ffmpeg-devel mailing list