aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ndpi_hash.c')
-rw-r--r--src/lib/ndpi_hash.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/ndpi_hash.c b/src/lib/ndpi_hash.c
index 8be352e03..8d78749fd 100644
--- a/src/lib/ndpi_hash.c
+++ b/src/lib/ndpi_hash.c
@@ -25,6 +25,15 @@
#include "ndpi_config.h"
#include "ndpi_api.h"
+#include "third_party/include/MurmurHash3.h"
+
+/* ******************************************************************** */
+
+/* Based on djb2 hash - http://www.cse.yorku.ca/~oz/hash.html */
+u_int32_t ndpi_murmur_hash(char *str, u_int str_len) {
+ return(MurmurHash((void*)str, str_len, 0x87654321));
+}
+
/* ******************************************************************** */
/* Based on djb2 hash - http://www.cse.yorku.ca/~oz/hash.html */