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

Diego Biurrun diego
Mon Jun 8 20:07:14 CEST 2009

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.

> 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

> #ifdef TEST
> #include <stdio.h>
> #undef printf

Add this file to the list of testprogs in the Makefile.


More information about the ffmpeg-devel mailing list