Added ndpi_murmur_hash to the nDPI API

This commit is contained in:
Luca Deri
2023-09-04 12:53:42 +02:00
parent f0dc3347ec
commit 4f2ce2d43b
3 changed files with 41 additions and 12 deletions
+9
View File
@@ -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 */