Go to the source code of this file.
|
| #define | USE_crypto 0x01 /* OpenSSL's libcrypto */ |
| |
| #define | USE_gcrypt 0x02 /* GnuTLS's libgcrypt */ |
| |
| #define | USE_tomcrypt 0x04 /* LibTomCrypt */ |
| |
| #define | USE_mbedcrypto 0x08 /* mbed TLS */ |
| |
| #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_mbedcrypto(...) /* 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(...) |
| |
|
| static void | fatal_error (const char *tag) |
| |
| static void | run_lavu_md5 (uint8_t *output, const uint8_t *input, unsigned size) |
| |
| static void | run_lavu_aes128 (uint8_t *output, const uint8_t *input, unsigned size) |
| |
| static void | run_lavu_blowfish (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_des (uint8_t *output, const uint8_t *input, unsigned size) |
| |
| static void | run_lavu_twofish (uint8_t *output, const uint8_t *input, unsigned size) |
| |
| static void | run_lavu_rc4 (uint8_t *output, const uint8_t *input, unsigned size) |
| |
| static void | run_lavu_xtea (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) |
| |
◆ USE_crypto
| #define USE_crypto 0x01 /* OpenSSL's libcrypto */ |
◆ USE_gcrypt
| #define USE_gcrypt 0x02 /* GnuTLS's libgcrypt */ |
◆ USE_tomcrypt
| #define USE_tomcrypt 0x04 /* LibTomCrypt */ |
◆ USE_mbedcrypto
| #define USE_mbedcrypto 0x08 /* mbed TLS */ |
◆ AV_READ_TIME
| #define AV_READ_TIME |
( |
|
x | ) |
0 |
◆ MAX_INPUT_SIZE
| #define MAX_INPUT_SIZE 1048576 |
◆ MAX_OUTPUT_SIZE
| #define MAX_OUTPUT_SIZE 128 |
◆ IMPL_USE_lavu
◆ DEFINE_LAVU_MD
| #define DEFINE_LAVU_MD |
( |
|
suffix, |
|
|
|
type, |
|
|
|
namespace, |
|
|
|
hsize |
|
) |
| |
Value:static void run_lavu_ ## suffix(uint8_t *
output, \
{ \
if (!
h && !(
h = av_ ##
namespace ## _alloc())) \
fatal_error("out of memory"); \
av_ ##
namespace ## _init(
h, hsize); \
av_ ##
namespace ## _final(
h,
output); \
}
Definition at line 96 of file crypto_bench.c.
◆ IMPL_USE_crypto
| #define IMPL_USE_crypto |
( |
|
... | ) |
/* ignore */ |
◆ IMPL_USE_gcrypt
| #define IMPL_USE_gcrypt |
( |
|
... | ) |
/* ignore */ |
◆ IMPL_USE_mbedcrypto
| #define IMPL_USE_mbedcrypto |
( |
|
... | ) |
/* ignore */ |
◆ IMPL_USE_tomcrypt
| #define IMPL_USE_tomcrypt |
( |
|
... | ) |
/* ignore */ |
◆ IMPL_USE
◆ IMPL
| #define IMPL |
( |
|
lib, |
|
|
|
... |
|
) |
| IMPL_USE_ ## lib(lib, __VA_ARGS__) |
◆ IMPL_ALL
Value: IMPL(lavu, __VA_ARGS__) \
IMPL(crypto, __VA_ARGS__) \
IMPL(gcrypt, __VA_ARGS__) \
IMPL(mbedcrypto, __VA_ARGS__) \
IMPL(tomcrypt, __VA_ARGS__)
Definition at line 634 of file crypto_bench.c.
◆ fatal_error()
| static void fatal_error |
( |
const char * |
tag | ) |
|
|
static |
◆ run_lavu_md5()
| static void run_lavu_md5 |
( |
uint8_t * |
output, |
|
|
const uint8_t * |
input, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ run_lavu_aes128()
| static void run_lavu_aes128 |
( |
uint8_t * |
output, |
|
|
const uint8_t * |
input, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ run_lavu_blowfish()
| static void run_lavu_blowfish |
( |
uint8_t * |
output, |
|
|
const uint8_t * |
input, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ run_lavu_camellia()
| static void run_lavu_camellia |
( |
uint8_t * |
output, |
|
|
const uint8_t * |
input, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ run_lavu_cast128()
| static void run_lavu_cast128 |
( |
uint8_t * |
output, |
|
|
const uint8_t * |
input, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ run_lavu_des()
| static void run_lavu_des |
( |
uint8_t * |
output, |
|
|
const uint8_t * |
input, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ run_lavu_twofish()
| static void run_lavu_twofish |
( |
uint8_t * |
output, |
|
|
const uint8_t * |
input, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ run_lavu_rc4()
| static void run_lavu_rc4 |
( |
uint8_t * |
output, |
|
|
const uint8_t * |
input, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ run_lavu_xtea()
| static void run_lavu_xtea |
( |
uint8_t * |
output, |
|
|
const uint8_t * |
input, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ crc32()
| static unsigned crc32 |
( |
const uint8_t * |
data, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ run_implementation()
| static void run_implementation |
( |
const uint8_t * |
input, |
|
|
uint8_t * |
output, |
|
|
struct hash_impl * |
impl, |
|
|
unsigned |
size |
|
) |
| |
|
static |
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
◆ enabled_libs
◆ enabled_algos
| const char* enabled_algos |
|
static |
◆ specified_runs
◆ hardcoded_key
| const uint8_t* hardcoded_key = "FFmpeg is the best program ever." |
|
static |
◆ implementations
Initial value:= {
IMPL_ALL(
"SHA-512", sha512,
"3afdd44a80d99af15c87bd724cb717243193767835ce866dd5d58c02d674bb57"
"7c25b9e118c200a189fcd5a01ef106a4e200061f3e97dbf50ba065745fd46bef")
}
Definition at line 641 of file crypto_bench.c.
Referenced by main().