Share via


AsymmetricSignatureProvider Class

Definition

Provides signature and verification operations for Asymmetric Algorithms using a SecurityKey.

public class AsymmetricSignatureProvider : Microsoft.IdentityModel.Tokens.SignatureProvider
type AsymmetricSignatureProvider = class
    inherit SignatureProvider
Public Class AsymmetricSignatureProvider
Inherits SignatureProvider
Inheritance
AsymmetricSignatureProvider

Constructors

AsymmetricSignatureProvider(SecurityKey, String, Boolean)

Initializes a new instance of the AsymmetricSignatureProvider class used for creating and verifying signatures.

AsymmetricSignatureProvider(SecurityKey, String)

Initializes a new instance of the AsymmetricSignatureProvider class used to create and verify signatures.

Fields

DefaultMinimumAsymmetricKeySizeInBitsForSigningMap

Mapping from algorithm to minimum AsymmetricSecurityKey.KeySize when creating signatures.

DefaultMinimumAsymmetricKeySizeInBitsForVerifyingMap

Mapping from algorithm to minimum AsymmetricSecurityKey.KeySize when verifying signatures.

Properties

Algorithm

Gets the signature algorithm.

(Inherited from SignatureProvider)
Context

Gets or sets a user context for a SignatureProvider.

(Inherited from SignatureProvider)
CryptoProviderCache

Gets or sets the CryptoProviderCache that is associated with this SignatureProvider

(Inherited from SignatureProvider)
Key

Gets the SecurityKey.

(Inherited from SignatureProvider)
MinimumAsymmetricKeySizeInBitsForSigningMap

Gets the mapping from algorithm to the minimum AsymmetricSecurityKey.KeySize for creating signatures.

MinimumAsymmetricKeySizeInBitsForVerifyingMap

Gets the mapping from algorithm to the minimum AsymmetricSecurityKey.KeySize for verifying signatures.

WillCreateSignatures

Gets or sets a bool indicating if this SignatureProvider is expected to create signatures.

(Inherited from SignatureProvider)

Methods

Dispose()

Calls Dispose(Boolean) and SuppressFinalize(Object)

(Inherited from SignatureProvider)
Dispose(Boolean)

Releases the resources used by the current instance.

GetHashAlgorithmName(String)

Creating a Signature requires the use of a HashAlgorithm. This method returns the HashAlgorithmName that describes the HashAlgorithmto use when generating a Signature.

Sign(Byte[], Int32, Int32)

Produces a signature over the specified region of the input.

Sign(Byte[])

Produces a signature over the 'input' using the AsymmetricSecurityKey and algorithm passed to AsymmetricSignatureProvider(SecurityKey, String, Boolean).

Sign(ReadOnlySpan<Byte>, Span<Byte>, Int32)

Produces a signature over the data and writes it to destination.

ValidateAsymmetricSecurityKeySize(SecurityKey, String, Boolean)

Validates that an asymmetric key size is of sufficient size for a SignatureAlgorithm.

Verify(Byte[], Byte[])

Verifies that the signature over input using the SecurityKey and Algorithm specified by this SignatureProvider are consistent.

Verify(Byte[], Int32, Int32, Byte[], Int32, Int32)

Verifies that a signature created over the 'input' matches the signature. Using SecurityKey and 'algorithm' passed to SignatureProvider(SecurityKey, String).

Applies to