<PackageReference Include="System.IO.Hashing" Version="10.0.0" />

XxHash3

public sealed class XxHash3 : NonCryptographicHashAlgorithm
Provides an implementation of the XXH3 hash algorithm for generating a 64-bit hash.
public XxHash3()

Initializes a new instance of the XxHash3 class using the default seed value 0.

public XxHash3(long seed)

Initializes a new instance of the XxHash3 class using the specified seed.

public static byte[] Hash(byte[] source)

Computes the XXH3 hash of the provided source data.

public static byte[] Hash(byte[] source, long seed)

Computes the XXH3 hash of the provided data using the provided seed.

public static byte[] Hash(ReadOnlySpan<byte> source, long seed = 0)

Computes the XXH3 hash of the provided source data using the optionally provided seed.

public static int Hash(ReadOnlySpan<byte> source, Span<byte> destination, long seed = 0)

Computes the XXH3 hash of the provided source data into the provided destination using the optionally provided seed.

public static ulong HashToUInt64(ReadOnlySpan<byte> source, long seed = 0)

Computes the XXH3 hash of the provided data.

public static bool TryHash(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, long seed = 0)

Attempts to compute the XXH3 hash of the provided source data into the provided destination using the optionally provided seed.

public XxHash3 Clone()

Returns a clone of the current instance, with a copy of the current instance's internal state.

public ulong GetCurrentHashAsUInt64()

Gets the current computed hash value without modifying accumulated state.