From 371dd98e3508045bc8346da3ed8225b76ce536f6 Mon Sep 17 00:00:00 2001 From: JP Aumasson Date: Fri, 19 Feb 2021 08:21:37 +0100 Subject: tests --- siphash.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'siphash.c') diff --git a/siphash.c b/siphash.c index 88f390c..065a593 100644 --- a/siphash.c +++ b/siphash.c @@ -20,13 +20,12 @@ #include #include - /* default: SipHash-2-4 */ #ifndef cROUNDS - #define cROUNDS 2 +#define cROUNDS 2 #endif #ifndef dROUNDS - #define dROUNDS 4 +#define dROUNDS 4 #endif #define ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b)))) @@ -68,16 +67,15 @@ #ifdef DEBUG #define TRACE \ do { \ - printf("(%3zu) v0 %016"PRIx64"\n", inlen, v0); \ - printf("(%3zu) v1 %016"PRIx64"\n", inlen, v1); \ - printf("(%3zu) v2 %016"PRIx64"\n", inlen, v2); \ - printf("(%3zu) v3 %016"PRIx64"\n", inlen, v3); \ + printf("(%3zu) v0 %016" PRIx64 "\n", inlen, v0); \ + printf("(%3zu) v1 %016" PRIx64 "\n", inlen, v1); \ + printf("(%3zu) v2 %016" PRIx64 "\n", inlen, v2); \ + printf("(%3zu) v3 %016" PRIx64 "\n", inlen, v3); \ } while (0) #else #define TRACE #endif - int siphash(const uint8_t *in, const size_t inlen, const uint8_t *k, uint8_t *out, const size_t outlen) { -- cgit v1.2.3