
public final class Hashes extends Object
| Modifier and Type | Field and Description |
|---|---|
private static Charset |
CHARSET |
private static HashFunction |
MURMUR128 |
private static HashFunction |
MURMUR32 |
| Modifier | Constructor and Description |
|---|---|
private |
Hashes() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
hash128(Object... data)
Computes a 64bit hash.
|
static int |
hash32(CharSequence data)
Computes a 32bit hash.
|
static int |
hash32(double data)
Computes a 32bit hash.
|
static int |
hash32(Double data)
Computes a 32bit hash.
|
static int |
hash32(float data)
Computes a 32bit hash.
|
static int |
hash32(Float data)
Computes a 32bit hash.
|
static int |
hash32(Integer data)
Computes a 32bit hash.
|
static int |
hash32(long data)
Computes a 32bit hash.
|
static int |
hash32(Long data)
Computes a 32bit hash.
|
static int |
hash32(Object... data)
Computes a 32bit hash.
|
static long |
hash64(CharSequence data)
Computes a 64bit hash.
|
static long |
hash64(double data)
Computes a 64bit hash.
|
static long |
hash64(Double data)
Computes a 64bit hash.
|
static long |
hash64(float data)
Computes a 64bit hash.
|
static long |
hash64(Float data)
Computes a 64bit hash.
|
static long |
hash64(Integer data)
Computes a 64bit hash.
|
static long |
hash64(long data)
Computes a 64bit hash.
|
static long |
hash64(Long data)
Computes a 64bit hash.
|
static long |
hash64(Object... data)
Computes a 64bit hash.
|
private static HashCode |
hashcode(Object... data) |
static HashCode |
hashResource(File in,
Consumer<IOException> onFailure) |
private static HashCode |
hashResource(InputStreamIterator it) |
static HashCode |
hashResource(Path in,
Consumer<IOException> onFailure) |
static HashCode |
hashResource(URL in,
Consumer<IOException> onFailure) |
private static void |
populateHasher(Object data,
Hasher h) |
private static final Charset CHARSET
private static final HashFunction MURMUR128
private static final HashFunction MURMUR32
public static byte[] hash128(Object... data)
data - the data to hashpublic static int hash32(CharSequence data)
data - the data to hashpublic static int hash32(double data)
data - the data to hashpublic static int hash32(Double data)
data - the data to hashpublic static int hash32(float data)
data - the data to hashpublic static int hash32(Float data)
data - the data to hashpublic static int hash32(Integer data)
data - the data to hashpublic static int hash32(long data)
data - the data to hashpublic static int hash32(Long data)
data - the data to hashpublic static int hash32(Object... data)
data - the data to hashpublic static long hash64(CharSequence data)
data - the data to hashpublic static long hash64(double data)
data - the data to hashpublic static long hash64(Double data)
data - the data to hashpublic static long hash64(float data)
data - the data to hashpublic static long hash64(Float data)
data - the data to hashpublic static long hash64(Integer data)
data - the data to hashpublic static long hash64(long data)
data - the data to hashpublic static long hash64(Long data)
data - the data to hashpublic static long hash64(Object... data)
data - the data to hashpublic static HashCode hashResource(File in, Consumer<IOException> onFailure)
in - input resourceonFailure - IOException handlerHashCode representation of the file (non
cryptographic)public static HashCode hashResource(Path in, Consumer<IOException> onFailure)
in - input resourceonFailure - IOException handlerHashCode representation of the file (non
cryptographic)public static HashCode hashResource(URL in, Consumer<IOException> onFailure)
in - input resourceonFailure - IOException handlerHashCode representation of the file (non
cryptographic)private static HashCode hashResource(InputStreamIterator it)
in - input resourceonFailure - IOException handlerHashCode representation of the file (non
cryptographic)