X509AsymmetricSecurityKey.IsSupportedAlgorithm(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value that indicates whether the specified algorithm is supported by this class.
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
Parameters
- algorithm
- String
The cryptographic algorithm.
Returns
true
when the specified algorithm is XmlDsigDSAUrl, XmlEncRSA15Url, XmlEncRSAOAEPUrl, XmlDsigRSASHA1Url, or RsaSha256Signature and the public key is of the right type; otherwise, false
.
Remarks
The IsSupportedAlgorithm method returns true
when one of the following is true:
The
algorithm
parameter is XmlDsigDSAUrl and the public key for the X.509 certificate specified in the constructor is of type DSA.The
algorithm
parameter is XmlEncRSA15Url, XmlEncRSAOAEPUrl, XmlDsigRSASHA1Url or RsaSha256Signature and the public key for the X.509 certificate specified in the constructor is of type RSA.
Due to collision problems with SHA1, Microsoft recommends a security model based on SHA256 or better.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應