chiark / gitweb /
util-lib: move formats-util.h from shared/ to basic/
[elogind.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 void siphash24_finalize(uint8_t out[8], struct siphash *state);
18
19 void siphash24(uint8_t out[8], const void *in, size_t inlen, const uint8_t k[16]);