zeek/src/siphash24.h
Jon Siwek 84e3e6c619 Merge remote-tracking branch 'origin/topic/timw/faster-hashing'
- 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
2020-02-25 19:56:17 -08:00

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);
}