aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/siphash.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/siphash.h')
-rw-r--r--src/stdlib/siphash.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/stdlib/siphash.h b/src/stdlib/siphash.h
new file mode 100644
index 00000000..67bad582
--- /dev/null
+++ b/src/stdlib/siphash.h
@@ -0,0 +1,15 @@
+#pragma once
+
+// An implementation of the SipHash algorithm.
+
+#include <stdint.h>
+#include <stddef.h>
+
+#include "util.h"
+
+// This value will be randomized on startup in tomo_init():
+extern uint64_t TOMO_HASH_KEY[2];
+
+PUREFUNC uint64_t siphash24(const uint8_t *src, size_t src_sz);
+
+// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0