Share via


AsymmetricSignatureProvider Constructor

Creates an instance of a signature provider that uses a AsymmetricSecurityKey for creating and verifying signatures.

Namespace:  System.IdentityModel.Tokens
Assembly:  System.IdentityModel.Tokens.Jwt (in System.IdentityModel.Tokens.Jwt.dll)

Syntax

'Declaration
Public Sub New ( _
    key As AsymmetricSecurityKey, _
    algorithm As String, _
    willCreateSignatures As Boolean _
)
public AsymmetricSignatureProvider(
    AsymmetricSecurityKey key,
    string algorithm,
    bool willCreateSignatures
)
public:
AsymmetricSignatureProvider(
    AsymmetricSecurityKey^ key, 
    String^ algorithm, 
    bool willCreateSignatures
)
new : 
        key:AsymmetricSecurityKey * 
        algorithm:string * 
        willCreateSignatures:bool -> AsymmetricSignatureProvider
public function AsymmetricSignatureProvider(
    key : AsymmetricSecurityKey, 
    algorithm : String, 
    willCreateSignatures : boolean
)

Parameters

  • algorithm
    Type: System.String

    The signature algorithm to apply.

  • willCreateSignatures
    Type: System.Boolean

    If a AsymmetricSignatureProvider is required to create signatures, this parameter should be set to true. Creating signatures requires that the AsymmetricSecurityKey has access to a private key. Verifying signatures (the default behavior), does not require access to the private key.

Exceptions

Exception Condition
ArgumentNullException

key is null or algorithm is null.

ArgumentException

algorithm contains only whitespace.

ArgumentOutOfRangeException
InvalidOperationException

.NET Framework Security

See Also

Reference

AsymmetricSignatureProvider Class

System.IdentityModel.Tokens Namespace