siphash24.c revision a095315b3c31f7a419baceac82c26c3c5ac0cd12
/*
SipHash reference C implementation
Written in 2012 by
Jean-Philippe Aumasson <jeanphilippe.aumasson@gmail.com>
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/>.
(Minimal changes made by Lennart Poettering, to make clean for inclusion in systemd)
*/
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "siphash24.h"
#define U32TO8_LE(p, v) \
#define U64TO8_LE(p, v) \
#define U8TO64_LE(p) \
(((u64)((p)[0]) ) | \
#define SIPROUND \
do { \
} while(0)
/* SipHash-2-4 */
{
/* "somepseudorandomlygeneratedbytes" */
u64 b;
u64 m;
{
#ifdef DEBUG
#endif
v3 ^= m;
v0 ^= m;
}
switch( left )
{
case 0: break;
}
#ifdef DEBUG
#endif
v3 ^= b;
v0 ^= b;
#ifdef DEBUG
#endif
v2 ^= 0xff;
}