EncryptingCredentials Constructors

Definition

Overloads

EncryptingCredentials(SymmetricSecurityKey, String)

Initializes a new instance of the EncryptingCredentials class.

EncryptingCredentials(SecurityKey, String, String)

Initializes a new instance of the EncryptingCredentials class.

EncryptingCredentials(X509Certificate2, String, String)

Initializes a new instance of the EncryptingCredentials class.

EncryptingCredentials(SymmetricSecurityKey, String)

Initializes a new instance of the EncryptingCredentials class.

public EncryptingCredentials (Microsoft.IdentityModel.Tokens.SymmetricSecurityKey key, string enc);
new Microsoft.IdentityModel.Tokens.EncryptingCredentials : Microsoft.IdentityModel.Tokens.SymmetricSecurityKey * string -> Microsoft.IdentityModel.Tokens.EncryptingCredentials
Public Sub New (key As SymmetricSecurityKey, enc As String)

Parameters

enc
String

Data encryption algorithm to apply.

Exceptions

if 'enc' is null or empty.

Remarks

Used in scenarios when a key represents a 'shared' symmetric key. For example, SAML 2.0 Assertion will be encrypted using a provided symmetric key which won't be serialized to a SAML token.

Applies to

EncryptingCredentials(SecurityKey, String, String)

Initializes a new instance of the EncryptingCredentials class.

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

Parameters

key
SecurityKey

SecurityKey to use when encrypting a session key.

alg
String

A key wrap algorithm to use when encrypting a session key.

enc
String

Data encryption algorithm to apply.

Exceptions

if 'enc' is null or empty.

Applies to

EncryptingCredentials(X509Certificate2, String, String)

Initializes a new instance of the EncryptingCredentials class.

protected EncryptingCredentials (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, string alg, string enc);
new Microsoft.IdentityModel.Tokens.EncryptingCredentials : System.Security.Cryptography.X509Certificates.X509Certificate2 * string * string -> Microsoft.IdentityModel.Tokens.EncryptingCredentials
Protected Sub New (certificate As X509Certificate2, alg As String, enc As String)

Parameters

alg
String

A key wrap algorithm to use when encrypting a session key.

enc
String

Data encryption algorithm to apply.

Exceptions

if 'enc' is null or empty.

Applies to