]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/siphash24.h
siphash: minor coding style fixes and modernizations
[thirdparty/systemd.git] / src / basic / siphash24.h
1 #pragma once
2
3 #include <inttypes.h>
4 #include <sys/types.h>
5
6 struct siphash {
7 uint64_t v0;
8 uint64_t v1;
9 uint64_t v2;
10 uint64_t v3;
11 uint64_t padding;
12 size_t inlen;
13 };
14
15 void siphash24_init(struct siphash *state, const uint8_t k[16]);
16 void siphash24_compress(const void *in, size_t inlen, struct siphash *state);
17 uint64_t siphash24_finalize(struct siphash *state);
18
19 uint64_t siphash24(const void *in, size_t inlen, const uint8_t k[16]);