#include "siphash.h"
#include "uint_t.h"
Go to the source code of this file.
|
typedef uint64 | u64 |
|
typedef uint32 | u32 |
|
typedef unsigned char | u8 |
|
|
int | siphash24 (unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k) |
|
◆ ROTL
#define ROTL |
( |
|
x, |
|
|
|
b |
|
) |
| (u64)(((x) << (b)) | ((x) >> (64 - (b)))) |
◆ SIPROUND
Value: do { \
x0 += x1; x1=
ROTL(x1,13); x1 ^= x0; x0=
ROTL(x0,32); \
x2 += x3; x3=
ROTL(x3,16); x3 ^= x2; \
x0 += x3; x3=
ROTL(x3,21); x3 ^= x0; \
x2 += x1; x1=
ROTL(x1,17); x1 ^= x2; x2=
ROTL(x2,32); \
} while(0)
Definition at line 48 of file siphash.c.
◆ U32TO8_LE
#define U32TO8_LE |
( |
|
p, |
|
|
|
v |
|
) |
| |
Value: (
p)[0] = (
u8)((v) ); (
p)[1] = (
u8)((v) >> 8); \
(
p)[2] = (
u8)((v) >> 16); (
p)[3] = (
u8)((v) >> 24);
Definition at line 30 of file siphash.c.
◆ U64TO8_LE
#define U64TO8_LE |
( |
|
p, |
|
|
|
v |
|
) |
| |
Value:
U32TO8_LE((
p) + 4, (
u32)((v) >> 32));
Definition at line 34 of file siphash.c.
◆ U8TO64_LE
Value:
((
u64)((
p)[2]) << 16) | \
((
u64)((
p)[3]) << 24) | \
((
u64)((
p)[4]) << 32) | \
((
u64)((
p)[5]) << 40) | \
((
u64)((
p)[6]) << 48) | \
Definition at line 38 of file siphash.c.
◆ u32
◆ u64
◆ u8
◆ siphash24()
int siphash24 |
( |
unsigned char * |
out, |
|
|
const unsigned char * |
in, |
|
|
unsigned long long |
inlen, |
|
|
const unsigned char * |
k |
|
) |
| |