public class HashUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
FNV_HASH_INIT |
static int |
FNV_HASH_PRIME |
| Modifier and Type | Method and Description |
|---|---|
static int |
hash(byte[] data,
int init)
Computes a hash of the given bytes, using the FNV-1a hashing function, but with a custom inital hash value.
|
static int |
hash(java.lang.String string,
int init)
Convience method for computing the FNV-1a hash on the UTF-8 encoded byte representation of the given String,
using the given initial hash value.
|
static int |
hashFnv1a32_UTF8(java.lang.String string)
Convience method for computing the FNV-1a hash on the UTF-8 encoded byte representation of the given String.
|
static int |
hashFnv1a32(byte[] data)
FNV-1a hashing function.
|
public static final int FNV_HASH_INIT
public static final int FNV_HASH_PRIME
public static int hashFnv1a32_UTF8(java.lang.String string)
public static int hash(java.lang.String string,
int init)
public static int hashFnv1a32(byte[] data)
https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
public static int hash(byte[] data,
int init)