On Sat, Feb 14, 2015 at 02:03:23PM +0530, supraja reddy wrote: > Hello, > > I have added the necessary functions for twofish in crypto_bench. > A note, there is no twofish implementation in openssl library but since the > code demands that all the libraries have the impl, i have introduced a > dummy function. Please let me know if anything has to be changed. > > Thanks, > Supraja
> crypto_bench.c | 42 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 42 insertions(+) > ad53f4022b8d892e9790a7421b806ab16cd12443 cb.patch > From 8b195ee7057d65d8cd2f81357af2a700317c993e Mon Sep 17 00:00:00 2001 > From: Supraja Meedinti <supraja0...@gmail.com> > Date: Sat, 14 Feb 2015 13:21:37 +0530 > Subject: [PATCH] tools: crypto_bench: added support for Twofish > > Signed-off-by: Supraja Meedinti <supraja0...@gmail.com> > --- > tools/crypto_bench.c | 42 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 42 insertions(+) > > diff --git a/tools/crypto_bench.c b/tools/crypto_bench.c > index 5e56d12..6b8a7e0 100644 > --- a/tools/crypto_bench.c > +++ b/tools/crypto_bench.c > @@ -77,6 +77,7 @@ struct hash_impl { > #include "libavutil/aes.h" > #include "libavutil/camellia.h" > #include "libavutil/cast5.h" > +#include "libavutil/twofish.h" > > #define IMPL_USE_lavu IMPL_USE > > @@ -133,6 +134,15 @@ static void run_lavu_cast128(uint8_t *output, > av_cast5_crypt(cast, output, input, size >> 3, 0); > } > > +static void run_lavu_twofish(uint8_t *output, > + const uint8_t *input, unsigned size) > +{ > + static struct AVTWOFISH *twofish; > + if (!twofish && !(twofish = av_twofish_alloc())) the memory should be freed somewhere otherwise memory debuggers would likely display a warning about a memleak (which could make it harder to see real problems) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not just one of them.
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel