aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README.md4
-rw-r--r--halfsiphash.h22
-rw-r--r--siphash.h1
-rw-r--r--test.c5
4 files changed, 29 insertions, 3 deletions
diff --git a/README.md b/README.md
index 2651bdd..3af4188 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
# SipHash
+[![License:
+CC0-1.0](https://licensebuttons.net/l/zero/1.0/80x15.png)](http://creativecommons.org/publicdomain/zero/1.0/)
+
+
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.
diff --git a/halfsiphash.h b/halfsiphash.h
new file mode 100644
index 0000000..f63e46d
--- /dev/null
+++ b/halfsiphash.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 halfsiphash(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
index 851b326..41ebf4c 100644
--- a/siphash.h
+++ b/siphash.h
@@ -20,3 +20,4 @@
int siphash(const uint8_t *in, const size_t inlen, const uint8_t *k,
uint8_t *out, const size_t outlen);
+
diff --git a/test.c b/test.c
index 2c047aa..538996f 100644
--- a/test.c
+++ b/test.c
@@ -11,6 +11,8 @@
*/
#include "vectors.h"
+#include "siphash.h"
+#include "halfsiphash.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
@@ -23,9 +25,6 @@
} \
printf("},\n");
-int siphash(const uint8_t *in, const size_t inlen, const uint8_t *k,
- uint8_t *out, const size_t outlen);
-
int halfsiphash(const uint8_t *in, const size_t inlen, const uint8_t *k,
uint8_t *out, const size_t outlen);