public class Murmur3 extends Object
Murmur3 32 and 128 bit variants. 32-bit Java port of https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp#94 128-bit Java port of https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp#255
This is a public domain code with no copyrights. From homepage of MurmurHash (https://code.google.com/p/smhasher/), "All MurmurHash versions are public domain software, and the author disclaims all copyright to their code."
| Modifier and Type | Field and Description | 
|---|---|
| static long | NULL_HASHCODE | 
| Constructor and Description | 
|---|
| Murmur3() | 
| Modifier and Type | Method and Description | 
|---|---|
| static long[] | hash128(byte[] data)Murmur3 128-bit variant. | 
| static long[] | hash128(byte[] data,
       int offset,
       int length,
       int seed)Murmur3 128-bit variant. | 
| static int | hash32(byte[] data)Murmur3 32-bit variant. | 
| static int | hash32(byte[] data,
      int length,
      int seed)Murmur3 32-bit variant. | 
| static long | hash64(byte[] data)Murmur3 64-bit variant. | 
| static long | hash64(byte[] data,
      int offset,
      int length) | 
| static long | hash64(byte[] data,
      int offset,
      int length,
      int seed)Murmur3 64-bit variant. | 
public static final long NULL_HASHCODE
public static int hash32(byte[] data)
data - - input byte arraypublic static int hash32(byte[] data,
                         int length,
                         int seed)
data - - input byte arraylength - - length of arrayseed - - seed. (default 0)public static long hash64(byte[] data)
data - - input byte arraypublic static long hash64(byte[] data,
                          int offset,
                          int length)
public static long hash64(byte[] data,
                          int offset,
                          int length,
                          int seed)
data - - input byte arraylength - - length of arrayseed - - seed. (default is 0)public static long[] hash128(byte[] data)
data - - input byte arraypublic static long[] hash128(byte[] data,
                             int offset,
                             int length,
                             int seed)
data - - input byte arrayoffset - - the first element of arraylength - - length of arrayseed - - seed. (default is 0)Copyright © 2013–2023 The Apache Software Foundation. All rights reserved.