FFmpeg
|
#include <stdlib.h>
#include <math.h>
#include "libavutil/avutil.h"
#include "libavutil/avstring.h"
#include "libavutil/crc.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/timer.h"
#include "compat/getopt.c"
#include "libavutil/md5.h"
#include "libavutil/sha.h"
#include "libavutil/sha512.h"
#include "libavutil/ripemd.h"
#include "libavutil/aes.h"
#include "libavutil/camellia.h"
#include "libavutil/cast5.h"
#include "libavutil/twofish.h"
Go to the source code of this file.
Data Structures | |
struct | hash_impl |
Macros | |
#define | USE_crypto 0x01 /* OpenSSL's libcrypto */ |
#define | USE_gcrypt 0x02 /* GnuTLS's libgcrypt */ |
#define | USE_tomcrypt 0x04 /* LibTomCrypt */ |
#define | AV_READ_TIME(x) 0 |
#define | MAX_INPUT_SIZE 1048576 |
#define | MAX_OUTPUT_SIZE 128 |
#define | IMPL_USE_lavu IMPL_USE |
#define | DEFINE_LAVU_MD(suffix, type, namespace, hsize) |
#define | IMPL_USE_crypto(...) /* ignore */ |
#define | IMPL_USE_gcrypt(...) /* ignore */ |
#define | IMPL_USE_tomcrypt(...) /* ignore */ |
#define | IMPL_USE(lib, name, symbol, output) { #lib, name, run_ ## lib ## _ ## symbol, output }, |
#define | IMPL(lib,...) IMPL_USE_ ## lib(lib, __VA_ARGS__) |
#define | IMPL_ALL(...) |
Functions | |
static void | fatal_error (const char *tag) |
static void | run_lavu_md5 (uint8_t *output, const uint8_t *input, unsigned size) |
DEFINE_LAVU_MD (sha1, AVSHA, sha, 160) | |
DEFINE_LAVU_MD (sha256, AVSHA, sha, 256) | |
DEFINE_LAVU_MD (sha512, AVSHA512, sha512, 512) | |
DEFINE_LAVU_MD (ripemd160, AVRIPEMD, ripemd, 160) | |
static void | run_lavu_aes128 (uint8_t *output, const uint8_t *input, unsigned size) |
static void | run_lavu_camellia (uint8_t *output, const uint8_t *input, unsigned size) |
static void | run_lavu_cast128 (uint8_t *output, const uint8_t *input, unsigned size) |
static void | run_lavu_twofish (uint8_t *output, const uint8_t *input, unsigned size) |
static unsigned | crc32 (const uint8_t *data, unsigned size) |
static void | run_implementation (const uint8_t *input, uint8_t *output, struct hash_impl *impl, unsigned size) |
int | main (int argc, char **argv) |
Variables | |
static const char * | enabled_libs |
static const char * | enabled_algos |
static unsigned | specified_runs |
static const uint8_t * | hardcoded_key = "FFmpeg is the best program ever." |
struct hash_impl | implementations [] |
#define USE_crypto 0x01 /* OpenSSL's libcrypto */ |
Definition at line 23 of file crypto_bench.c.
Referenced by main().
#define USE_gcrypt 0x02 /* GnuTLS's libgcrypt */ |
Definition at line 24 of file crypto_bench.c.
Referenced by main().
#define USE_tomcrypt 0x04 /* LibTomCrypt */ |
Definition at line 25 of file crypto_bench.c.
Referenced by main().
#define AV_READ_TIME | ( | x | ) | 0 |
Definition at line 37 of file crypto_bench.c.
Referenced by run_implementation().
#define MAX_INPUT_SIZE 1048576 |
Definition at line 47 of file crypto_bench.c.
Referenced by main().
#define MAX_OUTPUT_SIZE 128 |
Definition at line 48 of file crypto_bench.c.
Referenced by run_implementation().
#define IMPL_USE_lavu IMPL_USE |
Definition at line 82 of file crypto_bench.c.
#define DEFINE_LAVU_MD | ( | suffix, | |
type, | |||
namespace, | |||
hsize | |||
) |
Definition at line 90 of file crypto_bench.c.
#define IMPL_USE_crypto | ( | ... | ) | /* ignore */ |
Definition at line 209 of file crypto_bench.c.
#define IMPL_USE_gcrypt | ( | ... | ) | /* ignore */ |
Definition at line 275 of file crypto_bench.c.
#define IMPL_USE_tomcrypt | ( | ... | ) | /* ignore */ |
Definition at line 352 of file crypto_bench.c.
Definition at line 415 of file crypto_bench.c.
#define IMPL | ( | lib, | |
... | |||
) | IMPL_USE_ ## lib(lib, __VA_ARGS__) |
Definition at line 417 of file crypto_bench.c.
#define IMPL_ALL | ( | ... | ) |
|
static |
Definition at line 56 of file crypto_bench.c.
Referenced by main(), run_implementation(), run_lavu_aes128(), run_lavu_camellia(), run_lavu_cast128(), and run_lavu_twofish().
Definition at line 84 of file crypto_bench.c.
DEFINE_LAVU_MD | ( | sha1 | , |
AVSHA | , | ||
sha | , | ||
160 | |||
) |
DEFINE_LAVU_MD | ( | sha256 | , |
AVSHA | , | ||
sha | , | ||
256 | |||
) |
DEFINE_LAVU_MD | ( | sha512 | , |
AVSHA512 | , | ||
sha512 | , | ||
512 | |||
) |
DEFINE_LAVU_MD | ( | ripemd160 | , |
AVRIPEMD | , | ||
ripemd | , | ||
160 | |||
) |
Definition at line 107 of file crypto_bench.c.
Definition at line 117 of file crypto_bench.c.
Definition at line 127 of file crypto_bench.c.
Definition at line 137 of file crypto_bench.c.
|
static |
Definition at line 359 of file crypto_bench.c.
Referenced by run_implementation().
|
static |
Definition at line 364 of file crypto_bench.c.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 439 of file crypto_bench.c.
|
static |
Definition at line 50 of file crypto_bench.c.
Referenced by main(), and run_implementation().
|
static |
Definition at line 51 of file crypto_bench.c.
Referenced by main(), and run_implementation().
|
static |
Definition at line 52 of file crypto_bench.c.
Referenced by main(), and run_implementation().
|
static |
Definition at line 54 of file crypto_bench.c.
Referenced by run_lavu_aes128(), run_lavu_camellia(), run_lavu_cast128(), and run_lavu_twofish().
struct hash_impl implementations[] |
Definition at line 424 of file crypto_bench.c.