HMAC.TryHashFinal(Span<Byte>, Int32) Method

Definition

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

C#
protected override bool TryHashFinal (Span<byte> destination, out int bytesWritten);

Parameters

destination
Span<Byte>

The buffer to receive the 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 HMAC value; otherwise, false.

Exceptions

The method is not overriden in the derived type.

Remarks

The default implementation of this method throws a PlatformNotSupportedException because there is no managed implementation of HMAC.

Derived types must override this method.

Applies to

Product Versions
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.1