aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-12 12:45:37 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-12 12:45:37 +0100
commitda913877cd0f80ff05a19c4dbed935b21e4b860c (patch)
treedbd8b87305889fec537cc60adae5996877acc4ba /src
parentb00d4cd3cc0e70e90f50a8fed294754a4c6e9475 (diff)
downloadrspamd-da913877cd0f80ff05a19c4dbed935b21e4b860c.tar.gz
rspamd-da913877cd0f80ff05a19c4dbed935b21e4b860c.zip
[Minor] Adjust hashes
Diffstat (limited to 'src')
-rw-r--r--src/libutil/shingles.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/shingles.c b/src/libutil/shingles.c
index d00fb05b2..66f6b457c 100644
--- a/src/libutil/shingles.c
+++ b/src/libutil/shingles.c
@@ -109,7 +109,7 @@ rspamd_shingles_generate (GArray *input,
ht = RSPAMD_CRYPTOBOX_MUMHASH;
break;
default:
- ht = RSPAMD_CRYPTOBOX_HASHFAST;
+ ht = RSPAMD_CRYPTOBOX_HASHFAST_INDEPENDENT;
break;
}
@@ -133,7 +133,7 @@ rspamd_shingles_generate (GArray *input,
*(guint64 *)keys[j]);
val = 0;
for (k = 0; k < SHINGLES_WINDOW; k ++) {
- val ^= res[j * SHINGLES_WINDOW + k] >> (8 * k);
+ val ^= res[j * SHINGLES_WINDOW + k] >> (8 * (SHINGLES_WINDOW - k - 1));
}
g_assert (hlen > beg);