diff options
Diffstat (limited to 'crypto_aead/lilliputaei128v1/ref/test/helpers.h')
| -rw-r--r-- | crypto_aead/lilliputaei128v1/ref/test/helpers.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/crypto_aead/lilliputaei128v1/ref/test/helpers.h b/crypto_aead/lilliputaei128v1/ref/test/helpers.h new file mode 100644 index 0000000..e6e67a4 --- /dev/null +++ b/crypto_aead/lilliputaei128v1/ref/test/helpers.h @@ -0,0 +1,33 @@ +#pragma once + +#include <stdint.h> +#include <stdio.h> + +#include "parameters.h" + + +#define ARRAY_NB(A) (sizeof(A)/sizeof(A[0])) +#define ARRAY_END(A) (A+ARRAY_NB(A)) + + +#define ROUNDS 32 + + +struct vector_input +{ + char * name; + uint8_t key[KEY_BYTES]; + uint8_t tweak[TWEAK_BYTES]; +}; + +typedef struct vector_input vector_input; + + +static inline FILE* open_dump_file(const char *folder, const char* vector, const char *name) +{ + char filename[128]; + snprintf(filename, sizeof(filename), "%s/%s_%s.txt", folder, vector, name); + return fopen(filename, "w"); +} + + |
