From: Vsevolod Stakhov Date: Wed, 6 Mar 2019 14:24:21 +0000 (+0000) Subject: [Minor] Don't use random seed for hash tables it seems meaningless X-Git-Tag: 1.9.0~34 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7f19585b8e73e31d808ce719b904392a93f63621;p=rspamd.git [Minor] Don't use random seed for hash tables it seems meaningless --- 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