summaryrefslogtreecommitdiffstats
path: root/src/util/murmurhash3.h
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2011-12-27 19:56:43 -0500
committerSimo Sorce <simo@redhat.com>2012-01-09 15:00:32 -0500
commit5a70b84cb66fb8c7a3fce0e3f2e4b61e0b2ea9d4 (patch)
treed60aab13a1253480b797c0615c25487759ff0490 /src/util/murmurhash3.h
parenta096f75242bb612b7a1ae126c8e960934dc85fd4 (diff)
downloadsssd-5a70b84cb66fb8c7a3fce0e3f2e4b61e0b2ea9d4.tar.gz
sssd-5a70b84cb66fb8c7a3fce0e3f2e4b61e0b2ea9d4.tar.xz
sssd-5a70b84cb66fb8c7a3fce0e3f2e4b61e0b2ea9d4.zip
util: add murmurhash3 hash function
Diffstat (limited to 'src/util/murmurhash3.h')
-rw-r--r--src/util/murmurhash3.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/murmurhash3.h b/src/util/murmurhash3.h
new file mode 100644
index 000000000..9174554b9
--- /dev/null
+++ b/src/util/murmurhash3.h
@@ -0,0 +1,10 @@
+/* This file is based on the public domain MurmurHash3 from Austin Appleby:
+ * http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp
+ *
+ * We use only the 32 bit variant because the 2 produce different result while
+ * we need to produce the same result regardless of the architecture as
+ * clients can be both 64 or 32 bit at the same time.
+ */
+
+uint32_t murmurhash3(const char *key, int len, uint32_t seed);
+