summaryrefslogtreecommitdiffstats
path: root/src/libutil/upstream.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-10 16:38:43 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-10 16:38:43 +0100
commit952185f2b093374b878db91eafa5cbfa0777c100 (patch)
tree3f5a2aaa40edcf100b4c7b2641f369fdd0c9ed70 /src/libutil/upstream.c
parentd96c3b80561784386ba83f1421f091a65a8341ab (diff)
downloadrspamd-952185f2b093374b878db91eafa5cbfa0777c100.tar.gz
rspamd-952185f2b093374b878db91eafa5cbfa0777c100.zip
[Feature] New abstract hashing API in cryptobox
Diffstat (limited to 'src/libutil/upstream.c')
-rw-r--r--src/libutil/upstream.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c
index 020039d71..fe07e89d2 100644
--- a/src/libutil/upstream.c
+++ b/src/libutil/upstream.c
@@ -19,7 +19,7 @@
#include "ref.h"
#include "cfg_file.h"
#include "rdns.h"
-#include "xxhash.h"
+#include "cryptobox.h"
#include "utlist.h"
struct upstream_inet_addr_entry {
@@ -785,7 +785,8 @@ rspamd_upstream_get_hashed (struct upstream_list *ups, const guint8 *key, guint
guint32 idx;
/* Generate 64 bits input key */
- k = XXH64 (key, keylen, ups->hash_seed);
+ k = rspamd_cryptobox_fast_hash_specific (RSPAMD_CRYPTOBOX_XXHASH64,
+ key, keylen, ups->hash_seed);
rspamd_mutex_lock (ups->lock);
idx = rspamd_consistent_hash (k, ups->alive->len);