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.