IncrementalHash IncrementalHash IncrementalHash IncrementalHash Class

定義

提供支援,以跨多個區段累加計算雜湊或雜湊式訊息驗證碼 (HMAC) 值。Provides support for computing a hash or Hash-based Message Authentication Code (HMAC) value incrementally across several segments.

public ref class IncrementalHash sealed : IDisposable
public sealed class IncrementalHash : IDisposable
type IncrementalHash = class
    interface IDisposable
Public NotInheritable Class IncrementalHash
Implements IDisposable
繼承
IncrementalHashIncrementalHashIncrementalHashIncrementalHash
實作

屬性

AlgorithmName AlgorithmName AlgorithmName AlgorithmName

取得正在執行的演算法名稱。Gets the name of the algorithm being performed. HMAC 演算法前面會加上 "HMAC",以便與未加上索引鍵的摘要進行區分。HMAC algorithms are prepended with "HMAC" to distinguish them from an unkeyed digest.

方法

AppendData(Byte[]) AppendData(Byte[]) AppendData(Byte[]) AppendData(Byte[])

將指定的資料附加至已經雜湊或 HMAC 處理的資料尾端。Appends the specified data to the data already processed in the hash or HMAC.

AppendData(Byte[], Int32, Int32) AppendData(Byte[], Int32, Int32) AppendData(Byte[], Int32, Int32) AppendData(Byte[], Int32, Int32)

從指定的位移開始,將來自指定資料的指定位元組數目附加到已經過雜湊或雜湊式訊息驗證碼 (HMAC) 處理的資料。Appends the specified number of bytes from the specified data, starting at the specified offset, to the data already processed in the hash or Hash-based Message Authentication Code (HMAC).

AppendData(ReadOnlySpan<Byte>) AppendData(ReadOnlySpan<Byte>) AppendData(ReadOnlySpan<Byte>) AppendData(ReadOnlySpan<Byte>)
CreateHash(HashAlgorithmName) CreateHash(HashAlgorithmName) CreateHash(HashAlgorithmName) CreateHash(HashAlgorithmName)

為指定的演算法建立 IncrementalHashCreates an IncrementalHash for the specified algorithm.

CreateHMAC(HashAlgorithmName, Byte[]) CreateHMAC(HashAlgorithmName, Byte[]) CreateHMAC(HashAlgorithmName, Byte[]) CreateHMAC(HashAlgorithmName, Byte[])

為使用指定的雜湊演算法和金鑰的雜湊訊息驗證碼 (HMAC) 演算法建立 IncrementalHashCreates an IncrementalHash for the Hash-based Message Authentication Code (HMAC) algorithm using the specified hash algorithm and key.

Dispose() Dispose() Dispose() Dispose()

IncrementalHash 類別的目前執行個體所使用的資源釋出。Releases the resources used by the current instance of the IncrementalHash class.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashAndReset() GetHashAndReset() GetHashAndReset() GetHashAndReset()

從先前對 AppendData(Byte[]) 方法的呼叫所累積的資料,擷取雜湊或雜湊式訊息驗證碼 (HMAC),並將物件重設為其初始狀態。Retrieves the hash or Hash-based Message Authentication Code (HMAC) for the data accumulated from prior calls to the AppendData(Byte[]) method, and resets the object to its initial state.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)
TryGetHashAndReset(Span<Byte>, Int32) TryGetHashAndReset(Span<Byte>, Int32) TryGetHashAndReset(Span<Byte>, Int32) TryGetHashAndReset(Span<Byte>, Int32)

適用於