MurmurHash Class
- java.
lang. Object - com.
microsoft. azure. documentdb. MurmurHash
- com.
Implements
public final class MurmurHash
implements HashGenerator
The MurmurHash3 algorithm was created by Austin Appleby and placed in the public domain. This java port was authored by Yonik Seeley and also placed into the public domain. The author hereby disclaims copyright to this source code.
This produces exactly the same hash values as the final C++ version of MurmurHash3 and is thus suitable for producing the same hash values across platforms.
The 32 bit x86 version of this hash should be the fastest variant for relatively short keys like ids. See http://github.com/yonik/java\_util for future updates to this file.
Constructor Summary
Constructor | Description | |
---|---|---|
MurmurHash() |
Method Summary
Modifier and Type | Method and Description |
---|---|
byte[] | computeHash(byte[] data) |
static int |
computeHash(byte[] data, int len, int seed)
Returns the Murmur |
Methods inherited from java.lang.Object
Constructor Details
MurmurHash
public MurmurHash()
Method Details
computeHash
public byte[] computeHash(byte[] data)
Parameters:
computeHash
public static int computeHash(byte[] data, int len, int seed)
Returns the MurmurHash3_x86_32 hash.
Parameters:
Returns:
Applies to
Azure SDK for Java