语言

NonCryptographicHashAlgorithm.TryGetCurrentHash 方法

定义

尝试在不修改累积状态的情况下将计算的哈希值写入到该哈希值 destination 。

public:
 bool TryGetCurrentHash(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryGetCurrentHash(Span<byte> destination, out int bytesWritten);
member this.TryGetCurrentHash : Span<byte> * int -> bool
Public Function TryGetCurrentHash (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

参数

destination
Span<Byte>

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

bytesWritten
Int32

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

返回

true 如果 destination 足够长,无法接收计算的哈希值,则为 ;否则为 false。

适用于