XXH32 Method
- Namespace
- SatorImaging.UnityFundamentals
XXH32(ReadOnlySpan<byte>, uint)
public static int XXH32(ReadOnlySpan<byte> input, uint seed)
The XXH32 hash function.
Parameters
input
ReadOnlySpan<byte>The data to hash.
seed
uintA 32-bit value to seed the hash with.
Returns
- int
The 32-bit calculated hash value.
XXH32(ReadOnlySpan<byte>, int, uint)
public static int XXH32(ReadOnlySpan<byte> input, int length, uint seed)
The XXH32 hash function.
Parameters
input
ReadOnlySpan<byte>The data to hash.
length
intThe length of input. It is undefined behavior to have length larger than the capacity of input.
seed
uintA 32-bit value to seed the hash with.
Returns
- int
The 32-bit calculated hash value.
XXH32(string, uint, Span<byte>)
public static int XXH32(string input, uint seed, Span<byte> buffer)
The XXH32 hash function for string.
Parameters
input
stringseed
uintbuffer
Span<byte>Buffer used to convert string to UTF-8 byte array.
Note that enough space must be supplied. (string.Length x3 is recommended.)
Returns
- int
The 32-bit calculated hash value.
XXH32(string, uint, bool)
public static int XXH32(string input, uint seed, bool clearSharedBuffer = false)
The XXH32 hash function for string.
Parameters
Returns
- int
The 32-bit calculated hash value.