XxHash64.TryHash Method

Definition

Attempts to compute the XxHash64 hash of the provided data into the provided destination.

public static bool TryHash (ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten, long seed = 0);
static member TryHash : ReadOnlySpan<byte> * Span<byte> * int * int64 -> bool
Public Shared Function TryHash (source As ReadOnlySpan(Of Byte), destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional seed As Long = 0) As Boolean

Parameters

source
ReadOnlySpan<Byte>

The data to hash.

destination
Span<Byte>

The buffer that receives the computed hash value.

bytesWritten
Int32

When this method returns, contains the number of bytes written to destination.

seed
Int64

The seed value for this hash computation. The default is zero.

Returns

true if destination is long enough to receive the computed hash value (8 bytes); otherwise, false.

Applies to