XxHash32.TryHash 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
尝试将所提供的数据的 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>
要哈希的数据。
- bytesWritten
- Int32
当此方法返回时,包含写入到 destination
的字节数。
- seed
- Int32
此哈希计算的种子值。 默认值为零。
返回
true
如果 destination
足够长,) 接收计算的哈希值 (4 个字节,则为 ;否则为 false
。