HashAlgorithm.HashCore 方法

定義

多載

HashCore(Byte[], Int32, Int32)

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

HashCore(ReadOnlySpan<Byte>)

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

HashCore(Byte[], Int32, Int32)

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

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>)

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

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)

衍生類型應覆寫這個方法,以避免中繼資料複製。

適用於