aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--siphash.c8
-rw-r--r--siphash.h22
2 files changed, 27 insertions, 3 deletions
diff --git a/siphash.c b/siphash.c
index 71d85de..88f390c 100644
--- a/siphash.c
+++ b/siphash.c
@@ -1,7 +1,7 @@
/*
SipHash reference C implementation
- Copyright (c) 2012-2016 Jean-Philippe Aumasson
+ Copyright (c) 2012-2021 Jean-Philippe Aumasson
<jeanphilippe.aumasson@gmail.com>
Copyright (c) 2012-2014 Daniel J. Bernstein <djb@cr.yp.to>
@@ -14,11 +14,12 @@
this software. If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
*/
+
+#include "siphash.h"
#include <assert.h>
-#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
-#include <string.h>
+
/* default: SipHash-2-4 */
#ifndef cROUNDS
@@ -76,6 +77,7 @@
#define TRACE
#endif
+
int siphash(const uint8_t *in, const size_t inlen, const uint8_t *k,
uint8_t *out, const size_t outlen) {
diff --git a/siphash.h b/siphash.h
new file mode 100644
index 0000000..851b326
--- /dev/null
+++ b/siphash.h
@@ -0,0 +1,22 @@
+/*
+ SipHash reference C implementation
+
+ Copyright (c) 2012-2021 Jean-Philippe Aumasson
+ <jeanphilippe.aumasson@gmail.com>
+ Copyright (c) 2012-2014 Daniel J. Bernstein <djb@cr.yp.to>
+
+ To the extent possible under law, the author(s) have dedicated all copyright
+ and related and neighboring rights to this software to the public domain
+ worldwide. This software is distributed without any warranty.
+
+ You should have received a copy of the CC0 Public Domain Dedication along
+ with
+ this software. If not, see
+ <http://creativecommons.org/publicdomain/zero/1.0/>.
+ */
+
+#include <inttypes.h>
+#include <string.h>
+
+int siphash(const uint8_t *in, const size_t inlen, const uint8_t *k,
+ uint8_t *out, const size_t outlen);