aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--halfsiphash.c5
-rw-r--r--siphash.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/README.md b/README.md
index 4bf81f8..6350194 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ CC0-1.0](https://licensebuttons.net/l/zero/1.0/80x15.png)](http://creativecommon
SipHash is a family of pseudorandom functions (PRFs) optimized for speed on short messages.
-This is the reference C code of SipHash: portable, simple, optimized for clarify and debugging.
+This is the reference C code of SipHash: portable, simple, optimized for clarity and debugging.
SipHash was designed in 2012 by [Jean-Philippe Aumasson](https://aumasson.jp)
and [Daniel J. Bernstein](https://cr.yp.to) as a defense against [hash-flooding
diff --git a/halfsiphash.c b/halfsiphash.c
index 18e6be7..18ebadd 100644
--- a/halfsiphash.c
+++ b/halfsiphash.c
@@ -15,8 +15,8 @@
*/
#include "halfsiphash.h"
#include <assert.h>
+#include <stddef.h>
#include <stdint.h>
-#include <stdio.h>
/* default: SipHash-2-4 */
#ifndef cROUNDS
@@ -56,7 +56,10 @@
v2 = ROTL(v2, 16); \
} while (0)
+
#ifdef DEBUG_SIPHASH
+#include <stdio.h>
+
#define TRACE \
do { \
printf("(%3zu) v0 %08" PRIx32 "\n", inlen, v0); \
diff --git a/siphash.c b/siphash.c
index 8678e33..083ca19 100644
--- a/siphash.c
+++ b/siphash.c
@@ -17,8 +17,8 @@
#include "siphash.h"
#include <assert.h>
+#include <stddef.h>
#include <stdint.h>
-#include <stdio.h>
/* default: SipHash-2-4 */
#ifndef cROUNDS
@@ -65,6 +65,8 @@
} while (0)
#ifdef DEBUG_SIPHASH
+#include <stdio.h>
+
#define TRACE \
do { \
printf("(%3zu) v0 %016" PRIx64 "\n", inlen, v0); \