語言

XxHash32 類別

定義

提供 XxHash32 演算法的實作。

public ref class XxHash32 sealed : System::IO::Hashing::NonCryptographicHashAlgorithm
public sealed class XxHash32 : System.IO.Hashing.NonCryptographicHashAlgorithm
type XxHash32 = class
    inherit NonCryptographicHashAlgorithm
Public NotInheritable Class XxHash32
Inherits NonCryptographicHashAlgorithm
繼承

備註

對於能持久化計算出的數值雜湊值為位元組的方法,該值會以大恩迪安位元組順序寫入。

建構函式

名稱 Description
XxHash32()

初始化 XxHash32 類別的新執行個體。

XxHash32(Int32)

初始化一個以指定種子的新類別實例 XxHash32 。

屬性

名稱 Description
HashLengthInBytes

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

(繼承來源 NonCryptographicHashAlgorithm)

方法

名稱 Description
Append(Byte[])

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

(繼承來源 NonCryptographicHashAlgorithm)
Append(ReadOnlySpan<Byte>)

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

Append(Stream)

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

(繼承來源 NonCryptographicHashAlgorithm)
AppendAsync(Stream, CancellationToken)

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

(繼承來源 NonCryptographicHashAlgorithm)
Clone()

回傳當前實例的克隆,並附有該實例內部狀態的副本。

GetCurrentHash()

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

(繼承來源 NonCryptographicHashAlgorithm)
GetCurrentHash(Span<Byte>)

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

(繼承來源 NonCryptographicHashAlgorithm)
GetCurrentHashAsUInt32()

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

GetCurrentHashCore(Span<Byte>)

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

(繼承來源 NonCryptographicHashAlgorithm)
GetHashAndReset()

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

(繼承來源 NonCryptographicHashAlgorithm)
GetHashAndReset(Span<Byte>)

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

(繼承來源 NonCryptographicHashAlgorithm)
GetHashAndResetCore(Span<Byte>)

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

(繼承來源 NonCryptographicHashAlgorithm)
GetHashCode()
已淘汰.

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

(繼承來源 NonCryptographicHashAlgorithm)
Hash(Byte[], Int32)

利用提供的種子計算所提供資料的 XxHash32 雜湊值。

Hash(Byte[])

計算所提供資料的 XxHash32 雜湊值。

Hash(ReadOnlySpan<Byte>, Int32)

計算所提供資料的 XxHash32 雜湊值。

Hash(ReadOnlySpan<Byte>, Span<Byte>, Int32)

計算所提供資料的 XxHash32 雜湊值,轉換為所提供的目的地。

HashToUInt32(ReadOnlySpan<Byte>, Int32)

計算所提供資料的 XxHash32 雜湊值。

Reset()

將雜湊計算重設到初始狀態。

TryGetCurrentHash(Span<Byte>, Int32)

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

(繼承來源 NonCryptographicHashAlgorithm)
TryGetHashAndReset(Span<Byte>, Int32)

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

(繼承來源 NonCryptographicHashAlgorithm)
TryHash(ReadOnlySpan<Byte>, Span<Byte>, Int32, Int32)

嘗試將所提供資料的 XxHash32 雜湊值計算到所提供目的地。

適用於