AsymmetricSignatureProvider.ValidateAsymmetricSecurityKeySize 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.
Validates that an asymmetric key size is of sufficient size for a SignatureAlgorithm.
public virtual void ValidateAsymmetricSecurityKeySize (Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm, bool willCreateSignatures);
abstract member ValidateAsymmetricSecurityKeySize : Microsoft.IdentityModel.Tokens.SecurityKey * string * bool -> unit
override this.ValidateAsymmetricSecurityKeySize : Microsoft.IdentityModel.Tokens.SecurityKey * string * bool -> unit
Public Overridable Sub ValidateAsymmetricSecurityKeySize (key As SecurityKey, algorithm As String, willCreateSignatures As Boolean)
Parameters
- key
- SecurityKey
The asymmetric key to validate.
- algorithm
- String
Algorithm for which this key will be used.
- willCreateSignatures
- Boolean
Whether they key will be used for creating signatures.
Exceptions
if algorithm
is null or empty.
if key
.KeySize is less than the minimum
acceptable size.
Remarks
for minimum signing sizes. for minimum verifying sizes.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for