Class MurmurHash3
- Namespace
- MarymoorStudios.Core
- Assembly
- MarymoorStudios.Core.dll
MurmurHash3 for x64 (Little Endian).
public static class MurmurHash3
- Inheritance
-
MurmurHash3
- Inherited Members
Remarks
Reference: https://en.wikipedia.org/wiki/MurmurHash
Methods
Hash128(bool, UInt128)
MurmurHash3 128-bit implementation.
public static UInt128 Hash128(bool value, UInt128 seed)
Parameters
Returns
- UInt128
The 128-bit hash.
Hash128(ReadOnlySpan<byte>, UInt128)
MurmurHash3 128-bit implementation.
public static UInt128 Hash128(ReadOnlySpan<byte> span, UInt128 seed)
Parameters
span
ReadOnlySpan<byte>The data to hash.
seed
UInt128The seed to initialize with.
Returns
- UInt128
The 128-bit hash.
Hash128(string, UInt128)
MurmurHash3 128-bit implementation.
public static UInt128 Hash128(string value, UInt128 seed)
Parameters
Returns
- UInt128
The 128-bit hash.
Hash128<T>(ReadOnlySpan<T>, UInt128)
MurmurHash3 128-bit implementation.
public static UInt128 Hash128<T>(ReadOnlySpan<T> value, UInt128 seed) where T : unmanaged
Parameters
value
ReadOnlySpan<T>The data to hash.
seed
UInt128The seed to initialize with.
Returns
- UInt128
The 128-bit hash.
Type Parameters
T
Hash128<T>(T, UInt128)
MurmurHash3 128-bit implementation.
public static UInt128 Hash128<T>(T value, UInt128 seed) where T : unmanaged
Parameters
value
TThe data to hash.
seed
UInt128The seed to initialize with.
Returns
- UInt128
The 128-bit hash.
Type Parameters
T
Hash32(bool, uint)
MurmurHash3 32-bit implementation.
public static uint Hash32(bool value, uint seed)
Parameters
Returns
- uint
The 32-bit hash.
Hash32(ReadOnlySpan<byte>, uint)
MurmurHash3 32-bit implementation.
public static uint Hash32(ReadOnlySpan<byte> span, uint seed)
Parameters
span
ReadOnlySpan<byte>The data to hash.
seed
uintThe seed to initialize with.
Returns
- uint
The 32-bit hash.
Hash32(string, uint)
MurmurHash3 32-bit implementation.
public static uint Hash32(string value, uint seed)
Parameters
Returns
- uint
The 32-bit hash.
Hash32<T>(ReadOnlySpan<T>, uint)
MurmurHash3 32-bit implementation.
public static uint Hash32<T>(ReadOnlySpan<T> value, uint seed) where T : unmanaged
Parameters
value
ReadOnlySpan<T>The data to hash.
seed
uintThe seed to initialize with.
Returns
- uint
The 32-bit hash.
Type Parameters
T
Hash32<T>(T, uint)
MurmurHash3 32-bit implementation.
public static uint Hash32<T>(T value, uint seed) where T : unmanaged
Parameters
value
TThe data to hash.
seed
uintThe seed to initialize with.
Returns
- uint
The 32-bit hash.
Type Parameters
T
Hash64(bool, ulong)
MurmurHash3 64-bit implementation.
public static ulong Hash64(bool value, ulong seed)
Parameters
Returns
- ulong
The 64-bit hash.
Hash64(ReadOnlySpan<byte>, ulong)
MurmurHash3 64-bit implementation.
public static ulong Hash64(ReadOnlySpan<byte> span, ulong seed)
Parameters
span
ReadOnlySpan<byte>The data to hash.
seed
ulongThe seed to initialize with.
Returns
- ulong
The 64-bit hash.
Hash64(string, ulong)
MurmurHash3 64-bit implementation.
public static ulong Hash64(string value, ulong seed)
Parameters
Returns
- ulong
The 64-bit hash.
Hash64<T>(ReadOnlySpan<T>, ulong)
MurmurHash3 64-bit implementation.
public static ulong Hash64<T>(ReadOnlySpan<T> value, ulong seed) where T : unmanaged
Parameters
value
ReadOnlySpan<T>The data to hash.
seed
ulongThe seed to initialize with.
Returns
- ulong
The 64-bit hash.
Type Parameters
T
Hash64<T>(T, ulong)
MurmurHash3 64-bit implementation.
public static ulong Hash64<T>(T value, ulong seed) where T : unmanaged
Parameters
value
TThe data to hash.
seed
ulongThe seed to initialize with.
Returns
- ulong
The 64-bit hash.
Type Parameters
T