public class MurmurHash extends Object
This is a very fast, non-cryptographic hash suitable for general hash-based lookup. See http://murmurhash.googlepages.com/ for more details.
The C version of MurmurHash 2.0 found at that site was ported to Java by Andrzej Bialecki (ab at getopt org).
Constructor and Description |
---|
MurmurHash() |
Modifier and Type | Method and Description |
---|---|
static long |
hash64(byte[] data,
int length)
Generates 64 bit hash from byte array with default seed value.
|
static long |
hash64(byte[] data,
int length,
int seed)
Generates 64 bit hash from byte array of the given length and seed.
|
static long |
hash64(String s) |
public static long hash64(String s)
public static long hash64(byte[] data, int length)
data
- byte array to hashlength
- length of the array to hashpublic static long hash64(byte[] data, int length, int seed)
data
- byte array to hashlength
- length of the array to hashseed
- initial seed valueCopyright © 2018. All rights reserved.