ECDsaCng.HashAlgorithm 屬性
本文內容
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定簽署和驗證資料時使用的雜湊演算法。
public:
property System::Security::Cryptography::CngAlgorithm ^ HashAlgorithm { System::Security::Cryptography::CngAlgorithm ^ get(); void set(System::Security::Cryptography::CngAlgorithm ^ value); };
public System.Security.Cryptography.CngAlgorithm HashAlgorithm { get; set; }
member this.HashAlgorithm : System.Security.Cryptography.CngAlgorithm with get, set
Public Property HashAlgorithm As CngAlgorithm
指定雜湊演算法的物件。
值為 null
。
此屬性接受下列演算法: MD5、 Sha1、 Sha256、 Sha384、 和 Sha512。
也可以使用其他自定義哈希演算法。
由於 MD5 和 SHA1 發生衝突問題,Microsoft 建議 Sha256使用 。 預設演算法為 Sha256。
如果您要簽署或驗證已哈希的數據,則不會使用這個屬性。
產品 | 版本 |
---|---|
.NET | 6, 7, 8, 9, 10 |
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
Windows Desktop | 3.0, 3.1, 5 |