Hash.GenerateHash(HashAlgorithm) 方法

定義

使用指定的雜湊演算法計算組件的雜湊值。

public:
 cli::array <System::Byte> ^ GenerateHash(System::Security::Cryptography::HashAlgorithm ^ hashAlg);
public byte[] GenerateHash (System.Security.Cryptography.HashAlgorithm hashAlg);
member this.GenerateHash : System.Security.Cryptography.HashAlgorithm -> byte[]
Public Function GenerateHash (hashAlg As HashAlgorithm) As Byte()

參數

hashAlg
HashAlgorithm

用來計算組件雜湊值的雜湊演算法。

傳回

Byte[]

位元組陣列,表示組件的雜湊值。

例外狀況

hashAlg 參數為 null

無法產生組件的雜湊值。

備註

類別建構函式中指定的元件會提供計算雜湊值的位元組。 參數 hashAlg 是衍生自特定 HashAlgorithm 的物件。 傳回的雜湊值屬於 所 hashAlg 識別的類型。

適用於