mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-26 15:42:34 +01:00
I've made an exception for cases where I'm sure that users can't influence the inputs. This is likely to cause a slowdown somewhere, but it's safer to siphash everything and *then* look for cases to optimize. This patch doesn't actually get us any _benefit_ from siphash yet, since we don't really randomize the key at any point.
13 lines
295 B
C
13 lines
295 B
C
#ifndef SIPHASH_H
|
|
#define SIPHASH_H
|
|
|
|
struct sipkey {
|
|
uint64_t k0;
|
|
uint64_t k1;
|
|
};
|
|
uint64_t siphash24(const void *src, unsigned long src_sz, const struct sipkey *key);
|
|
|
|
void siphash_set_global_key(const struct sipkey *key);
|
|
uint64_t siphash24g(const void *src, unsigned long src_sz);
|
|
|
|
#endif
|