Hash.GenerateHash(HashAlgorithm) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
利用指定的雜湊演算法計算組裝的雜湊值。
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識別的類型。