Commit d5b58f67 authored by Nicolas George's avatar Nicolas George

tools: add benchmark for crypto functions.

The benchmark tests the speed of the following algorithms:
MD5, SHA-1, SHA-256, SHA-512, RIPEMD-160, AES-128.

It can optionally be built to perform the same benchmark on
other crypto libraries, for comparison purposes.
The supported libraries are:
- crypto:   OpenSSL's libcrypto;
- gcrypt:   GnuTLS's libgcrypt;
- tomcrypt: LibTomCrypt
To enable them, use this syntax:
make VERSUS=crypto+gcrypt+tomcrypt tools/crypto_bench
They do not need to have been enabled in configure.
parent dc8f7322
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
/tools/aviocat /tools/aviocat
/tools/ffbisect /tools/ffbisect
/tools/bisect.need /tools/bisect.need
/tools/crypto_bench
/tools/cws2fws /tools/cws2fws
/tools/fourcc2pixfmt /tools/fourcc2pixfmt
/tools/ffescape /tools/ffescape
......
...@@ -159,6 +159,9 @@ TESTPROGS = adler32 \ ...@@ -159,6 +159,9 @@ TESTPROGS = adler32 \
TESTPROGS-$(HAVE_LZO1X_999_COMPRESS) += lzo TESTPROGS-$(HAVE_LZO1X_999_COMPRESS) += lzo
TOOLS = ffhash ffeval ffescape TOOLS = crypto_bench ffhash ffeval ffescape
tools/crypto_bench$(EXESUF): ELIBS += $(if $(VERSUS),$(subst +, -l,+$(VERSUS)),)
tools/crypto_bench$(EXESUF): CFLAGS += -DUSE_EXT_LIBS=0$(if $(VERSUS),$(subst +,+USE_,+$(VERSUS)),)
$(SUBDIR)lzo-test$(EXESUF): ELIBS = -llzo2 $(SUBDIR)lzo-test$(EXESUF): ELIBS = -llzo2
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment