aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/shingles.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-11 15:54:47 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-05-11 15:54:47 +0100
commit4932b636ef23b7b0c9c356c9144457039253945e (patch)
tree0f086aac6c37acc408a85fcfd45800144b63574c /src/libutil/shingles.h
parentbcb5eaadd0b810b399fbdb133253bbc9ec7f060e (diff)
downloadrspamd-4932b636ef23b7b0c9c356c9144457039253945e.tar.gz
rspamd-4932b636ef23b7b0c9c356c9144457039253945e.zip
[Feature] Add more algorithms for shingles generation
Diffstat (limited to 'src/libutil/shingles.h')
-rw-r--r--src/libutil/shingles.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libutil/shingles.h b/src/libutil/shingles.h
index d252a78f6..a46a2fc0f 100644
--- a/src/libutil/shingles.h
+++ b/src/libutil/shingles.h
@@ -25,6 +25,12 @@ struct rspamd_shingle {
guint64 hashes[RSPAMD_SHINGLE_SIZE];
};
+enum rspamd_shingle_alg {
+ RSPAMD_SHINGLES_OLD = 0,
+ RSPAMD_SHINGLES_XXHASH,
+ RSPAMD_SHINGLES_MUMHASH,
+};
+
/**
* Shingles filtering function
* @param input input array of hashes
@@ -48,7 +54,8 @@ struct rspamd_shingle* rspamd_shingles_generate (GArray *input,
const guchar key[16],
rspamd_mempool_t *pool,
rspamd_shingles_filter filter,
- gpointer filterd);
+ gpointer filterd,
+ enum rspamd_shingle_alg alg);
/**
* Compares two shingles and return result as a floating point value - 1.0