語言

NonCryptographicHashAlgorithm.GetHashAndResetCore(Span<Byte>) 方法

定義

將計算出的雜湊值寫入, destination 然後清除累積狀態。

protected:
 virtual void GetHashAndResetCore(Span<System::Byte> destination);
protected virtual void GetHashAndResetCore(Span<byte> destination);
abstract member GetHashAndResetCore : Span<byte> -> unit
override this.GetHashAndResetCore : Span<byte> -> unit
Protected Overridable Sub GetHashAndResetCore (destination As Span(Of Byte))

參數

destination
Span<Byte>

接收計算出雜湊值的緩衝區。

備註

此方法的實作必須精確地寫HashLengthInBytes入位元組。destination 不要假設緩衝區是零初始化的。

類別在 NonCryptographicHashAlgorithm 呼叫此方法前會驗證緩衝區大小,並將張寬切片至精確 HashLengthInBytes 長度。

此方法的預設實作會呼叫 GetCurrentHashCore(Span<Byte>) ,接著 Reset()。 此方法的覆寫不必呼叫上述任一方法,但必須確保呼叫者無法觀察到行為差異。

適用於