CryptoProviderFactory.IsSupportedAlgorithm 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.
Overloads
IsSupportedAlgorithm(String) |
Checks if an algorithm is supported. |
IsSupportedAlgorithm(String, SecurityKey) |
Checks if the algorithm and SecurityKey is supported. |
IsSupportedAlgorithm(String)
Checks if an algorithm is supported.
public virtual bool IsSupportedAlgorithm (string algorithm);
abstract member IsSupportedAlgorithm : string -> bool
override this.IsSupportedAlgorithm : string -> bool
Public Overridable Function IsSupportedAlgorithm (algorithm As String) As Boolean
Parameters
- algorithm
- String
the name of the Hash algorithm.
Returns
true if:
If CustomCryptoProvider is set and IsSupportedAlgorithm(String, Object[]) returns true.
The algorithm is supported.
Remarks
Only considers known Hash algorithms.
Applies to
IsSupportedAlgorithm(String, SecurityKey)
Checks if the algorithm and SecurityKey is supported.
public virtual bool IsSupportedAlgorithm (string algorithm, Microsoft.IdentityModel.Tokens.SecurityKey key);
abstract member IsSupportedAlgorithm : string * Microsoft.IdentityModel.Tokens.SecurityKey -> bool
override this.IsSupportedAlgorithm : string * Microsoft.IdentityModel.Tokens.SecurityKey -> bool
Public Overridable Function IsSupportedAlgorithm (algorithm As String, key As SecurityKey) As Boolean
Parameters
- algorithm
- String
the security algorithm to apply.
- key
- SecurityKey
the SecurityKey.
Returns
true if:
If CustomCryptoProvider is set and IsSupportedAlgorithm(String, Object[]) returns true.
The algorithm / key pair is supported.
Remarks
Algorithms are supported for specific key types. For example:
RsaSha256 and RsaSecurityKey will return true.
RsaSha256 and SymmetricSecurityKey will return false.
Applies to
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour