diff options
Diffstat (limited to '')
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | halfsiphash.h | 22 | ||||
-rw-r--r-- | siphash.h | 1 | ||||
-rw-r--r-- | test.c | 5 |
4 files changed, 29 insertions, 3 deletions
@@ -1,5 +1,9 @@ # SipHash +[](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); @@ -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); + @@ -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); |