IncrementalHash.TryGetHashAndReset(Span<Byte>, Int32) Method

Definition

Attempts to finalize the hash computation after the last data is processed by the hash algorithm.

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

Parameters

destination
Span<Byte>

The buffer to receive the hash or Hash-Based Message Authentication Code (HMAC) value.

bytesWritten
Int32

When this method returns, the total number of bytes written into destination. This parameter is treated as uninitialized.

Returns

true if destination is long enough to receive the hash or HMAC value; otherwise, false.

Exceptions

The IncrementalHash object has already been disposed.

Applies to