XxHash32.TryHash 方法

定义

尝试将所提供的数据的 XxHash32 哈希计算到提供的目标中。

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

参数

source
ReadOnlySpan<Byte>

要哈希的数据。

destination
Span<Byte>

接收计算的哈希值的缓冲区。

bytesWritten
Int32

当此方法返回时,包含写入到 destination 的字节数。

seed
Int32

此哈希计算的种子值。 默认值为零。

返回

true 如果 destination 足够长,) 接收计算的哈希值 (4 个字节,则为 ;否则为 false

适用于