From 7f19585b8e73e31d808ce719b904392a93f63621 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 6 Mar 2019 14:24:21 +0000 Subject: [PATCH] [Minor] Don't use random seed for hash tables it seems meaningless --- src/libutil/util.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libutil/util.c b/src/libutil/util.c index 1f0c5fa70..d5ec57845 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -2429,13 +2429,21 @@ rspamd_deinit_libs (struct rspamd_external_libs_ctx *ctx) guint64 rspamd_hash_seed (void) { +#if 0 static guint64 seed; if (seed == 0) { seed = ottery_rand_uint64 (); } +#endif - return seed; + /* Proved to be random, I promise! */ + /* + * TODO: discover if it worth to use random seed on run + * with ordinary hash function or we need to switch to + * siphash1-3 or other slow cooker function... + */ + return 0xabf9727ba290690bULL; } static inline gdouble -- 2.39.5