HashAlgorithm.TryComputeHash 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
尝试计算指定字节数组的哈希值。
public:
bool TryComputeHash(ReadOnlySpan<System::Byte> source, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryComputeHash(ReadOnlySpan<byte> source, Span<byte> destination, out int bytesWritten);
member this.TryComputeHash : ReadOnlySpan<byte> * Span<byte> * int -> bool
Public Function TryComputeHash (source As ReadOnlySpan(Of Byte), destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean
参数
- source
- ReadOnlySpan<Byte>
要计算其哈希代码的输入。
- bytesWritten
- Int32
此方法返回时,包含写入 destination到的字节总数。 此参数被视为未初始化。
返回
true 如果 destination 足够长,无法接收哈希值,则为 ;否则为 false。