HashAlgorithm.HashCore 方法

定義

多載

HashCore(Byte[], Int32, Int32)

在衍生類別中覆寫時,將寫入物件的資料轉遞到用來計算雜湊的雜湊演算法。

HashCore(ReadOnlySpan<Byte>)

將寫入物件的資料路由傳送至雜湊演算法,以用來計算雜湊。

HashCore(Byte[], Int32, Int32)

來源:
HashAlgorithm.cs
來源:
HashAlgorithm.cs
來源:
HashAlgorithm.cs

在衍生類別中覆寫時,將寫入物件的資料轉遞到用來計算雜湊的雜湊演算法。

protected:
 abstract void HashCore(cli::array <System::Byte> ^ array, int ibStart, int cbSize);
protected abstract void HashCore (byte[] array, int ibStart, int cbSize);
abstract member HashCore : byte[] * int * int -> unit
Protected MustOverride Sub HashCore (array As Byte(), ibStart As Integer, cbSize As Integer)

參數

array
Byte[]

要用來計算雜湊碼的輸入。

ibStart
Int32

位元組陣列中的座標,從此處開始使用資料。

cbSize
Int32

位元組陣列中要用作資料的位元組數目。

備註

應用程式程式代碼不會呼叫這個方法。

這個抽象方法會執行哈希計算。 每次寫入密碼編譯哈希演算法時,都會透過這個方法傳遞數據。 針對每個數據區塊,此方法會更新哈希物件的狀態,以便在數據結尾傳回正確的哈希值。

適用於

HashCore(ReadOnlySpan<Byte>)

來源:
HashAlgorithm.cs
來源:
HashAlgorithm.cs
來源:
HashAlgorithm.cs

將寫入物件的資料路由傳送至雜湊演算法,以用來計算雜湊。

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

參數

source
ReadOnlySpan<Byte>

要用來計算雜湊碼的輸入。

備註

此方法預設實作會 source 複製到暫存數位,並呼叫 HashCore(Byte[], Int32, Int32)

衍生型別應該覆寫這個方法,以避免複製元數據。

適用於