]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/basic/siphash24.h
resolve: voidify sd_event_add_signal() and sd_event_set_watchdog()
[thirdparty/systemd.git] / src / basic / siphash24.h
CommitLineData
9bf3b535
LP
1#pragma once
2
3#include <inttypes.h>
11c3a366
TA
4#include <stddef.h>
5#include <stdint.h>
9bf3b535
LP
6#include <sys/types.h>
7
7c57f504 8struct siphash {
6059dab8
LP
9 uint64_t v0;
10 uint64_t v1;
11 uint64_t v2;
12 uint64_t v3;
13 uint64_t padding;
14 size_t inlen;
7c57f504
TG
15};
16
0cb3c286 17void siphash24_init(struct siphash *state, const uint8_t k[16]);
7c57f504 18void siphash24_compress(const void *in, size_t inlen, struct siphash *state);
d5115566
LP
19#define siphash24_compress_byte(byte, state) siphash24_compress((const uint8_t[]) { (byte) }, 1, (state))
20
933f9cae 21uint64_t siphash24_finalize(struct siphash *state);
7c57f504 22
933f9cae 23uint64_t siphash24(const void *in, size_t inlen, const uint8_t k[16]);