EncryptingCredentials Constructors
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.
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
SymmetricSecurityKey to apply.
- enc
- String
Data encryption algorithm to apply.
Exceptions
If the SecurityKey is not a SymmetricSecurityKey.
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
- certificate
- X509Certificate2
- 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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for