Table of Contents

XXH32 Method

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 uint

A 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 int

The length of input. It is undefined behavior to have length larger than the capacity of input.

seed uint

A 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 string
seed uint
buffer 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

input string
seed uint
clearSharedBuffer bool

Clear buffer when return it to shared array pool.

Returns

int

The 32-bit calculated hash value.