public final class MurmurHash extends Object implements HashGenerator
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 and Description |
|---|
MurmurHash() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
computeHash(byte[] data) |
static int |
computeHash(byte[] data,
int len,
int seed)
Returns the MurmurHash3_x86_32 hash.
|
public static int computeHash(byte[] data,
int len,
int seed)
data - a byte array containing the data to be hashedlen - an integer indicating the length of dataseed - an integer to be used as hash seedpublic byte[] computeHash(byte[] data)
computeHash in interface HashGeneratorCopyright © 2018. All rights reserved.