ECDsaCng.HashAlgorithm 屬性

定義

取得或設定簽署和驗證資料時使用的雜湊演算法。

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

備註

此屬性接受下列演算法: MD5Sha1Sha256Sha384 、 和 Sha512

也可以使用其他自訂雜湊演算法。

由於 MD5 和 SHA1 發生衝突問題,Microsoft建議 Sha256 。 預設演算法為 Sha256

如果您要簽署或驗證已雜湊的資料,則不會使用這個屬性。

適用於