aboutsummaryrefslogtreecommitdiff
path: root/siphash.c
diff options
context:
space:
mode:
authorKyle Altendorf <sda@fstab.net>2019-09-10 08:43:15 -0400
committerKyle Altendorf <sda@fstab.net>2019-09-10 08:43:23 -0400
commite802f9cc563abdb6f3ee4c4137edc6f293fdd8d2 (patch)
tree341fa5f8d011756778a1932c0325b958ada0041f /siphash.c
parentMerge pull request #13 from altendky/use_UINTxx_C_macros (diff)
downloadsiphash-e802f9cc563abdb6f3ee4c4137edc6f293fdd8d2.tar.gz
siphash-e802f9cc563abdb6f3ee4c4137edc6f293fdd8d2.tar.xz
Make *c* and *d* rounds less intrusively configurable
Diffstat (limited to 'siphash.c')
-rw-r--r--siphash.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/siphash.c b/siphash.c
index 41c6f50..78bdf9f 100644
--- a/siphash.c
+++ b/siphash.c
@@ -20,8 +20,12 @@
#include <string.h>
/* default: SipHash-2-4 */
-#define cROUNDS 2
-#define dROUNDS 4
+#ifndef cROUNDS
+ #define cROUNDS 2
+#endif
+#ifndef dROUNDS
+ #define dROUNDS 4
+#endif
#define ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))