4 #define TEST_NAME "verify1"
7 unsigned char v16
[16], v16x
[16];
8 unsigned char v32
[32], v32x
[32];
9 unsigned char v64
[64], v64x
[64];
13 randombytes_buf(v16
, sizeof v16
);
14 randombytes_buf(v32
, sizeof v32
);
15 randombytes_buf(v64
, sizeof v64
);
17 memcpy(v16x
, v16
, sizeof v16
);
18 memcpy(v32x
, v32
, sizeof v32
);
19 memcpy(v64x
, v64
, sizeof v64
);
21 printf("%d\n", crypto_verify_16(v16
, v16x
));
22 printf("%d\n", crypto_verify_32(v32
, v32x
));
23 printf("%d\n", crypto_verify_64(v64
, v64x
));
25 v16x
[randombytes_random() & 15U]++;
26 v32x
[randombytes_random() & 31U]++;
27 v64x
[randombytes_random() & 63U]++;
29 printf("%d\n", crypto_verify_16(v16
, v16x
));
30 printf("%d\n", crypto_verify_32(v32
, v32x
));
31 printf("%d\n", crypto_verify_64(v64
, v64x
));