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

Michael Niedermayer michaelni
Thu Jun 11 13:23:30 CEST 2009


On Thu, Jun 11, 2009 at 12:12:25PM +0300, Kostya wrote:
> On Thu, Jun 11, 2009 at 08:10:03AM +0300, Kostya wrote:
> > On Wed, Jun 10, 2009 at 07:41:59PM +0200, Michael Niedermayer wrote:
> > > On Wed, Jun 10, 2009 at 06:11:49PM +0300, Kostya wrote:
> [...]
> > > 
> > > these functions look very similar to sha1
> > > cant they be shared?
> > 
> > In essence, there are such differences from SHA-1:
> > * different digest size
> > * different initialization data
> > * different transform
> > * different digest size
> > 
> > Maybe I should rename existing files into sha.[ch] and extend it
> > instead:
> > 
> > /**
> >  * Initializes SHA hashing.
> >  *
> >  * @param context pointer to function context (allocate av_sha1_size
> >  * bytes of memory and pass here)
> >  * @param bits    number of bits in digest (SHA-1 - 160 bits, SHA-2 224
> >  * or 256 bits; 384 or 512 bits may be supported in the future)
> >  * @return 0 if initialization succeeded, -1 otherwise
> >  */
> > 
> > int av_sha_init(AVSHA* context, int bits) 
> 
> And here's proof of concept (contains cosmetics, I have not reformatted
> sha1.c yet).

i cant see any cosmetics in it, also i think that one has already been
applied, maybe you attached the wrong patch?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090611/11d77ed4/attachment.pgp>



More information about the ffmpeg-devel mailing list