NonCryptographicHashAlgorithm 類別

定義

代表非密碼學雜湊演算法。

public ref class NonCryptographicHashAlgorithm abstract
public abstract class NonCryptographicHashAlgorithm
type NonCryptographicHashAlgorithm = class
Public MustInherit Class NonCryptographicHashAlgorithm
繼承
NonCryptographicHashAlgorithm
衍生

建構函式

名稱 Description
NonCryptographicHashAlgorithm(Int32)

從衍生類別中的建構子呼叫以初始化類別。NonCryptographicHashAlgorithm

屬性

名稱 Description
HashLengthInBytes

取得此雜湊演算法產生的位元組數。

方法

名稱 Description
Append(Byte[])

將 的內容 source 附加到目前雜湊計算中已處理的資料。

Append(ReadOnlySpan<Byte>)

當在派生類別中覆寫時,會將 的內容 source 附加到目前雜湊計算中已處理的資料中。

Append(Stream)

將 的內容 stream 附加到目前雜湊計算中已處理的資料。

AppendAsync(Stream, CancellationToken)

非同步讀取 的內容 stream ,並將其附加到目前雜湊計算中已處理的資料中。

GetCurrentHash()

取得目前計算出的雜湊值,且不修改累積狀態。

GetCurrentHash(Span<Byte>)

將計算出的雜湊值寫入 destination ,且不修改累積狀態。

GetCurrentHashCore(Span<Byte>)

當在導出類別中覆寫時,會將計算出來的雜湊值寫入 destination ,且不修改累積狀態。

GetHashAndReset()

取得目前計算的雜湊值並清除累積狀態。

GetHashAndReset(Span<Byte>)

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

GetHashAndResetCore(Span<Byte>)

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

GetHashCode()
已淘汰.

此方法不被支援,不應被呼叫。 打電話 GetCurrentHash()GetHashAndReset() 改打。

Reset()

當在衍生類別中覆寫時,會將雜湊計算重設為初始狀態。

TryGetCurrentHash(Span<Byte>, Int32)

嘗試在不修改累積狀態的情況下,將計算出的雜湊值寫入 。destination

TryGetHashAndReset(Span<Byte>, Int32)

嘗試將計算出的雜湊值寫入 destination。 若成功,則清除累積狀態。

適用於