summaryrefslogtreecommitdiff
path: root/crypto_aead/lilliputaei128v1/ref/test/helpers.h
blob: f4e5208cf6be8c67fa7d2366c0430363631065ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef HELPERS_H
#define HELPERS_H

#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))


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");
}



#endif /* HELPERS_H */