mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00

- Minor cleanups in siphash24.h (code style, header include) - Updated COPYING.3rdparty with new license info * origin/topic/timw/faster-hashing: Add a faster siphash24 implementation than the reference one
15 lines
354 B
C
15 lines
354 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#define SIPHASH_KEYLEN 16
|
|
|
|
extern "C" {
|
|
uint64_t siphash24(const void* src, unsigned long src_sz, const uint64_t* key);
|
|
}
|
|
|
|
// [Bro] Wrapper for better type-safety.
|
|
inline void siphash(uint64_t* digest, const uint8_t* in, uint64_t inlen, const uint8_t* key)
|
|
{
|
|
*digest = siphash24(in, inlen, (const uint64_t*)key);
|
|
}
|