2 #define TEST_NAME "siphashx24"
10 unsigned char in[MAXLEN];
11 unsigned char out[crypto_shorthash_siphashx24_BYTES];
12 unsigned char k[crypto_shorthash_siphashx24_KEYBYTES];
16 for (i = 0; i < crypto_shorthash_siphashx24_KEYBYTES; ++i) {
17 k[i] = (unsigned char) i;
19 for (i = 0; i < MAXLEN; ++i) {
20 in[i] = (unsigned char) i;
21 crypto_shorthash_siphashx24(out, in, (unsigned long long) i, k);
22 for (j = 0; j < crypto_shorthash_siphashx24_BYTES; ++j) {
23 printf("%02x", (unsigned int) out[j]);
27 assert(crypto_shorthash_siphashx24_KEYBYTES >= crypto_shorthash_siphash24_KEYBYTES);
28 assert(crypto_shorthash_siphashx24_BYTES > crypto_shorthash_siphash24_BYTES);
29 assert(crypto_shorthash_siphashx24_bytes() == crypto_shorthash_siphashx24_BYTES);
30 assert(crypto_shorthash_siphashx24_keybytes() == crypto_shorthash_siphashx24_KEYBYTES);