HMAC.TryHashFinal(Span<Byte>, Int32) 方法

定义

在 HMAC 算法处理最后一个数据后,尝试结束 HMAC 计算。

protected:
 override bool TryHashFinal(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
protected override bool TryHashFinal (Span<byte> destination, out int bytesWritten);
override this.TryHashFinal : Span<byte> * int -> bool
Protected Overrides Function TryHashFinal (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

参数

destination
Span<Byte>

要接收 HMAC 值的缓冲区。

bytesWritten
Int32

此方法返回时,为写入 destination 的字节总数。 该参数未经初始化即被处理。

返回

Boolean

destination 的长度不足以接收 HMAC 值,则为 true;否则为 false

例外

不在派生类型中重写此方法。

注解

此方法的默认实现会引发一个 PlatformNotSupportedException ,因为 HMAC 没有托管实现。

派生类型必须重写此方法。

适用于