diff options
Diffstat (limited to 'crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c')
| -rw-r--r-- | crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c b/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c index 53ea14c..8449ea4 100644 --- a/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c +++ b/crypto_aead/lilliputaei128v1/ref/test/test-tweakey.c @@ -3,22 +3,7 @@ #include "tweakey.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; +#include "helpers.h" /* [0]: LSB */ @@ -76,14 +61,6 @@ vector_input VECTORS[] = { }; -FILE* open_dump_file(const char *folder, const char *name) -{ - char filename[128]; - snprintf(filename, sizeof(filename), "%s/tweakey_%s.txt", folder, name); - return fopen(filename, "w"); -} - - int main(int argc, char const * const *argv) { if (argc < 2) @@ -95,7 +72,7 @@ int main(int argc, char const * const *argv) for (vector_input* input=VECTORS; input<ARRAY_END(VECTORS); input++) { printf("%s\n", input->name); - FILE* dump = open_dump_file(argv[1], input->name); + FILE* dump = open_dump_file(argv[1], "tweakey", input->name); fprintf(dump, "Building Tweakey :\n"); |
