Package org.drasyl.util
Class Murmur3
java.lang.Object
org.drasyl.util.Murmur3
This class contains methods for MurmurHash3 generation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
murmur3_x86_32
(byte[] data) Generates a MurmurHash3 x86 32-bit hash without seed.static int
murmur3_x86_32
(byte[] data, int seed) Generates a MurmurHash3 x86 32-bit hash.static byte[]
murmur3_x86_32BytesLE
(byte[] data) Generates a MurmurHash3 x86 32-bit hash without seed with Little Endian Byte Order.static byte[]
murmur3_x86_32BytesLE
(byte[] data, int seed) Generates a MurmurHash3 x86 32-bit hash with Little Endian Byte Order.static int
murmur3_x86_32LE
(byte[] data) Generates a MurmurHash3 x86 32-bit hash without seed with Little Endian Byte Order.static int
murmur3_x86_32LE
(byte[] data, int seed) Generates a MurmurHash3 x86 32-bit hash with Little Endian Byte Order.
-
Method Details
-
murmur3_x86_32
public static int murmur3_x86_32(byte[] data) Generates a MurmurHash3 x86 32-bit hash without seed.- Parameters:
data
- the input to hash- Returns:
- the MurmurHash3 x86 32-bit hash
- Throws:
NullPointerException
- ifdata
isnull
-
murmur3_x86_32
public static int murmur3_x86_32(byte[] data, int seed) Generates a MurmurHash3 x86 32-bit hash.This method is a Java port of the
MurmurHash3_x86_32
function from Austin Appleby.- Parameters:
data
- the input to hashseed
- the initial seed value- Returns:
- the MurmurHash3 x86 32-bit hash
- Throws:
NullPointerException
- ifdata
isnull
-
murmur3_x86_32LE
public static int murmur3_x86_32LE(byte[] data, int seed) Generates a MurmurHash3 x86 32-bit hash with Little Endian Byte Order.- Parameters:
data
- the input to hashseed
- the initial seed value- Returns:
- the MurmurHash3 x86 32-bit hash
- Throws:
NullPointerException
- ifdata
isnull
-
murmur3_x86_32LE
public static int murmur3_x86_32LE(byte[] data) Generates a MurmurHash3 x86 32-bit hash without seed with Little Endian Byte Order.- Parameters:
data
- the input to hash- Returns:
- the MurmurHash3 x86 32-bit hash
- Throws:
NullPointerException
- ifdata
isnull
-
murmur3_x86_32BytesLE
public static byte[] murmur3_x86_32BytesLE(byte[] data, int seed) Generates a MurmurHash3 x86 32-bit hash with Little Endian Byte Order.- Parameters:
data
- the input to hashseed
- the initial seed value- Returns:
- the MurmurHash3 x86 32-bit hash
- Throws:
NullPointerException
- ifdata
isnull
-
murmur3_x86_32BytesLE
public static byte[] murmur3_x86_32BytesLE(byte[] data) Generates a MurmurHash3 x86 32-bit hash without seed with Little Endian Byte Order.- Parameters:
data
- the input to hash- Returns:
- the MurmurHash3 x86 32-bit hash
- Throws:
NullPointerException
- ifdata
isnull
-