AsymmetricSignatureProvider.ValidateAsymmetricSecurityKeySize Method

Definition

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 algorithmis null or empty.

if key.KeySize is less than the minimum acceptable size.

Remarks

for minimum signing sizes. for minimum verifying sizes.

Applies to