cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
siphash.h
Go to the documentation of this file.
1
#ifndef __CWIST_SIPHASH_H__
2
#define __CWIST_SIPHASH_H__
3
4
#include <stdint.h>
5
#include <stddef.h>
6
14
uint64_t
siphash24
(
const
void
*src,
size_t
len,
const
uint8_t key[16]);
15
// Generates random hash
16
// e.g.,
17
// (...)
18
// uint8_t key[16];
19
// cwist_generate_hash_seed(key);
20
// uint64_t hash = siphash24(src, len, key);
21
void
cwist_generate_hash_seed
(uint8_t key[16]);
22
#endif
siphash24
uint64_t siphash24(const void *src, size_t len, const uint8_t key[16])
Compute SipHash-2-4 over a byte range using a 16-byte secret key.
Definition
siphash.c:52
cwist_generate_hash_seed
void cwist_generate_hash_seed(uint8_t key[16])
Generates a random SipHash seed.
Definition
siphash.c:223
include
cwist
siphash.h
Generated by
1.9.8