| /* ------------------------------------------------------------------------- */ |
/* ------------------------------------------------------------------------- */ |
| |
|
| #define BYTES_TO_BLOCKS(b) ((b + ECRYPT_BLOCKLENGTH - 1) / ECRYPT_BLOCKLENGTH) |
#define BYTES_TO_BLOCKS(b) ((b + ECRYPT_BLOCKLENGTH - 1) / ECRYPT_BLOCKLENGTH) |
| |
|
| |
#undef MAX |
| #define MAX(a, b) ((a) > (b) ? (a) : (b)) |
#define MAX(a, b) ((a) > (b) ? (a) : (b)) |
| |
|
| #define MIN_KEYS_TO_TEST 100 |
#define MIN_KEYS_TO_TEST 100 |
| /* And then compute how many tests can be made in 1/10th second */ \ |
/* And then compute how many tests can be made in 1/10th second */ \ |
| start = clock(); \ |
start = clock(); \ |
| \ |
\ |
| for(i = 0; clock() < start + CLOCKS_PER_SEC / 10; i += keys_to_test) \ |
for(i = 0; clock() < start + CLOCKS_PER_SEC / 10; i++) \ |
| for(j = 0; j < keys_to_test; j++) \ |
for(j = 0; j < keys_to_test; j++) \ |
| TEST; \ |
TEST; \ |
| \ |
\ |