Tor
0.4.9.2-alpha-dev
Toggle main menu visibility
Main Page
Related Pages
Modules
Data Structures
Data Structures
Data Structure Index
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerator
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
b
c
d
f
g
h
l
m
n
o
p
r
s
v
Enumerations
a
b
c
d
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
g
h
i
m
n
o
p
q
r
s
t
v
w
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
ext
equix
hashx
src
siphash.h
1
/* Copyright (c) 2020 tevador <tevador@gmail.com> */
2
/* See LICENSE for licensing information */
3
4
#ifndef SIPHASH_H
5
#define SIPHASH_H
6
7
#include <stdint.h>
8
#include <hashx.h>
9
10
#define ROTL(x, b) (((x) << (b)) | ((x) >> (64 - (b))))
11
#define SIPROUND(v0, v1, v2, v3) \
12
do { \
13
v0 += v1; v2 += v3; v1 = ROTL(v1, 13); \
14
v3 = ROTL(v3, 16); v1 ^= v0; v3 ^= v2; \
15
v0 = ROTL(v0, 32); v2 += v1; v0 += v3; \
16
v1 = ROTL(v1, 17); v3 = ROTL(v3, 21); \
17
v1 ^= v2; v3 ^= v0; v2 = ROTL(v2, 32); \
18
} while (0)
19
20
typedef
struct
siphash_state
{
21
uint64_t v0, v1, v2, v3;
22
}
siphash_state
;
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
28
HASHX_PRIVATE uint64_t hashx_siphash13_ctr(uint64_t input,
const
siphash_state
* keys);
29
HASHX_PRIVATE
void
hashx_siphash24_ctr_state512(
const
siphash_state
* keys, uint64_t input, uint64_t state_out[8]);
30
31
#ifdef __cplusplus
32
}
33
#endif
34
35
#endif
siphash_state
Definition:
siphash.h:20
Generated by
1.9.4