djbdnscurve6 45
djbdnscurve6
Loading...
Searching...
No Matches
Macros | Typedefs | Functions
siphash.c File Reference
#include "siphash.h"
#include "uint_t.h"
Include dependency graph for siphash.c:

Go to the source code of this file.

Macros

#define ROTL(x, b)   (u64)(((x) << (b)) | ((x) >> (64 - (b))))
 
#define U32TO8_LE(p, v)
 
#define U64TO8_LE(p, v)
 
#define U8TO64_LE(p)
 
#define SIPROUND
 

Typedefs

typedef uint64 u64
 
typedef uint32 u32
 
typedef unsigned char u8
 

Functions

int siphash24 (unsigned char *out, const unsigned char *in, unsigned long long inlen, const unsigned char *k)
 

Macro Definition Documentation

◆ ROTL

#define ROTL (   x,
  b 
)    (u64)(((x) << (b)) | ((x) >> (64 - (b))))

Definition at line 28 of file siphash.c.

◆ SIPROUND

#define 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)
#define ROTL(x, b)
Definition: siphash.c:28

Definition at line 48 of file siphash.c.

◆ U32TO8_LE

#define U32TO8_LE (   p,
 
)
Value:
(p)[0] = (u8)((v) ); (p)[1] = (u8)((v) >> 8); \
(p)[2] = (u8)((v) >> 16); (p)[3] = (u8)((v) >> 24);
char * p
Definition: dnscache.c:37
unsigned char u8
Definition: siphash.c:26

Definition at line 30 of file siphash.c.

◆ U64TO8_LE

#define U64TO8_LE (   p,
 
)
Value:
U32TO8_LE((p), (u32)((v) )); \
U32TO8_LE((p) + 4, (u32)((v) >> 32));
#define U32TO8_LE(p, v)
Definition: siphash.c:30
uint32 u32
Definition: siphash.c:25

Definition at line 34 of file siphash.c.

◆ U8TO64_LE

#define U8TO64_LE (   p)
Value:
(((u64)((p)[0]) ) | \
((u64)((p)[1]) << 8) | \
((u64)((p)[2]) << 16) | \
((u64)((p)[3]) << 24) | \
((u64)((p)[4]) << 32) | \
((u64)((p)[5]) << 40) | \
((u64)((p)[6]) << 48) | \
((u64)((p)[7]) << 56))
uint64 u64
Definition: siphash.c:24

Definition at line 38 of file siphash.c.

Typedef Documentation

◆ u32

typedef uint32 u32

Definition at line 25 of file siphash.c.

◆ u64

typedef uint64 u64

Definition at line 24 of file siphash.c.

◆ u8

typedef unsigned char u8

Definition at line 26 of file siphash.c.

Function Documentation

◆ siphash24()

int siphash24 ( unsigned char *  out,
const unsigned char *  in,
unsigned long long  inlen,
const unsigned char *  k 
)

Definition at line 57 of file siphash.c.

Here is the call graph for this function: