SymmetricSignatureProvider Class
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.
Provides signing and verifying operations using a SymmetricSecurityKey and specifying an algorithm.
public class SymmetricSignatureProvider : Microsoft.IdentityModel.Tokens.SignatureProvider
type SymmetricSignatureProvider = class
inherit SignatureProvider
Public Class SymmetricSignatureProvider
Inherits SignatureProvider
- Inheritance
Constructors
SymmetricSignatureProvider(SecurityKey, String, Boolean) |
Initializes a new instance of the SymmetricSignatureProvider class that uses an SecurityKey to create and / or verify signatures over a array of bytes. |
SymmetricSignatureProvider(SecurityKey, String) |
Initializes a new instance of the SymmetricSignatureProvider class that uses an SecurityKey to create and / or verify signatures over a array of bytes. |
Fields
DefaultMinimumSymmetricKeySizeInBits |
This is the minimum SymmetricSecurityKey.KeySize when creating and 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) |
MinimumSymmetricKeySizeInBits |
Gets or sets the minimum SymmetricSecurityKey.KeySize"/>. |
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. |
GetKeyBytes(SecurityKey) |
Called to obtain the byte[] needed to create a KeyedHashAlgorithm |
GetKeyedHashAlgorithm(Byte[], String) |
Returns a KeyedHashAlgorithm. This method is called just before a cryptographic operation. This provides the opportunity to obtain the KeyedHashAlgorithm from an object pool. If this method is overridden, it is importont to override ReleaseKeyedHashAlgorithm(KeyedHashAlgorithm) if custom releasing of the KeyedHashAlgorithm is desired. |
ReleaseKeyedHashAlgorithm(KeyedHashAlgorithm) |
This method is called just after the cryptographic operation. If GetKeyedHashAlgorithm(Byte[], String) was overridden this method can be overridden for any custom handling such as returning the KeyedHashAlgorithm to an object pool. |
Sign(Byte[], Int32, Int32) |
Produces a signature over the specified region of the |
Sign(Byte[]) |
Produces a signature over the 'input' using the SymmetricSecurityKey and 'algorithm' passed to SymmetricSignatureProvider(SecurityKey, String). |
Sign(ReadOnlySpan<Byte>, Span<Byte>, Int32) |
Produces a signature over the |
Verify(Byte[], Byte[], Int32) |
Verifies that a signature created over the 'input' matches the signature. Using SymmetricSecurityKey and 'algorithm' passed to SymmetricSignatureProvider(SecurityKey, String). |
Verify(Byte[], Byte[]) |
Verifies that a signature created over the 'input' matches the signature. Using SymmetricSecurityKey and 'algorithm' passed to SymmetricSignatureProvider(SecurityKey, String). |
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). |