Freigeben über


AuthenticatedEncryptionProvider(SecurityKey, String) Constructor

Definition

Initializes a new instance of the AuthenticatedEncryptionProvider class used for encryption and decryption.

public AuthenticatedEncryptionProvider (Microsoft.IdentityModel.Tokens.SecurityKey key, string algorithm);
new Microsoft.IdentityModel.Tokens.AuthenticatedEncryptionProvider : Microsoft.IdentityModel.Tokens.SecurityKey * string -> Microsoft.IdentityModel.Tokens.AuthenticatedEncryptionProvider
Public Sub New (key As SecurityKey, algorithm As String)

Parameters

key
SecurityKey

The SecurityKey that will be used for crypto operations.

algorithm
String

The encryption algorithm to be used.

Exceptions

Thrown if algorithm is null or whitespace.

Thrown if the key size is not large enough.

Thrown if a symmetricSignatureProvider is not created.

Applies to