mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Merge remote-tracking branch 'origin/topic/johanna/bit-1612'
Addig a new random seed for external tests. I added a wrapper around the siphash() function to make calling it a little bit safer at least. BIT-1612 #merged * origin/topic/johanna/bit-1612: HLL: Fix missing typecast in test case. Remove the -K/-J options for setting keys. Add test checking the quality of HLL by adding a lot of elements. Fix serializing probabilistic hashers. Baseline updates after hash function change. Also switch BloomFilters from H3 to siphash. Change Hashing from H3 to Siphash. HLL: Remove unnecessary comparison. Hyperloglog: change calculation of Rho
This commit is contained in:
commit
4d84ee82da
347 changed files with 26269 additions and 26053 deletions
10
src/util.h
10
src/util.h
|
@ -23,7 +23,9 @@
|
|||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include "bro-config.h"
|
||||
#include "siphash24.h"
|
||||
|
||||
#if __STDC__
|
||||
#define myattribute __attribute__
|
||||
|
@ -181,10 +183,11 @@ extern std::string strreplace(const std::string& s, const std::string& o, const
|
|||
// Remove all leading and trailing white space from string.
|
||||
extern std::string strstrip(std::string s);
|
||||
|
||||
extern bool hmac_key_set;
|
||||
extern uint8 shared_hmac_md5_key[16];
|
||||
extern bool siphash_key_set;
|
||||
extern uint8 shared_siphash_key[SIPHASH_KEYLEN];
|
||||
|
||||
extern int hmac_key_set;
|
||||
extern unsigned char shared_hmac_md5_key[16];
|
||||
extern void hmac_md5(size_t size, const unsigned char* bytes,
|
||||
unsigned char digest[16]);
|
||||
|
||||
|
@ -194,8 +197,7 @@ extern void hmac_md5(size_t size, const unsigned char* bytes,
|
|||
// over the "seed" argument. If write_file is given, the seeds are written
|
||||
// to that file.
|
||||
//
|
||||
extern void init_random_seed(uint32 seed, const char* load_file,
|
||||
const char* write_file);
|
||||
extern void init_random_seed(const char* load_file, const char* write_file);
|
||||
|
||||
// Retrieves the initial seed computed after the very first call to
|
||||
// init_random_seed(). Repeated calls to init_random_seed() will not affect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue