Baca dalam bahasa Inggris Edit

Bagikan melalui


XxHash32.TryHash Method

Definition

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

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

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
Int32

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

Returns

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

Applies to

Produk Versi
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)