共用方式為


X509AsymmetricSecurityKey.IsSupportedAlgorithm(String) 方法

定義

取得值,這個值會指出這個類別是否支援指定的演算法。

public:
 override bool IsSupportedAlgorithm(System::String ^ algorithm);
public override bool IsSupportedAlgorithm (string algorithm);
override this.IsSupportedAlgorithm : string -> bool
Public Overrides Function IsSupportedAlgorithm (algorithm As String) As Boolean

參數

algorithm
String

密碼編譯演算法。

傳回

如果指定的演算法是 XmlDsigDSAUrlXmlEncRSA15UrlXmlEncRSAOAEPUrlXmlDsigRSASHA1UrlRsaSha256Signature,而且公開金鑰的類型正確,則為 true,否則為 false

備註

當下列任一情形發生時,IsSupportedAlgorithm 方法會傳回 true

由於 SHA1 的衝突問題,Microsoft 建議您使用以 SHA256 或更好的加密方式為基礎的安全性模型。

適用於