Edit

Share via


RsaEncryptionCookieTransform Constructors

Definition

Initializes a new instance of the RsaEncryptionCookieTransform class.

Overloads

RsaEncryptionCookieTransform(RSA)

Initializes a new instance of the RsaEncryptionCookieTransform class that uses the specified key for encryption and decryption.

RsaEncryptionCookieTransform(X509Certificate2)

Initializes a new instance of the RsaEncryptionCookieTransform class that uses the private key of the specified X.509 certificate for encryption and decryption.

RsaEncryptionCookieTransform(RSA)

Initializes a new instance of the RsaEncryptionCookieTransform class that uses the specified key for encryption and decryption.

public:
 RsaEncryptionCookieTransform(System::Security::Cryptography::RSA ^ key);
public RsaEncryptionCookieTransform (System.Security.Cryptography.RSA key);
new System.IdentityModel.RsaEncryptionCookieTransform : System.Security.Cryptography.RSA -> System.IdentityModel.RsaEncryptionCookieTransform
Public Sub New (key As RSA)

Parameters

key
RSA

The key to use as the default encryption and decryption key. Initializes the DecryptionKeys and EncryptionKey properties.

Exceptions

key is null.

Applies to

RsaEncryptionCookieTransform(X509Certificate2)

Initializes a new instance of the RsaEncryptionCookieTransform class that uses the private key of the specified X.509 certificate for encryption and decryption.

public:
 RsaEncryptionCookieTransform(System::Security::Cryptography::X509Certificates::X509Certificate2 ^ certificate);
public RsaEncryptionCookieTransform (System.Security.Cryptography.X509Certificates.X509Certificate2 certificate);
new System.IdentityModel.RsaEncryptionCookieTransform : System.Security.Cryptography.X509Certificates.X509Certificate2 -> System.IdentityModel.RsaEncryptionCookieTransform
Public Sub New (certificate As X509Certificate2)

Parameters

certificate
X509Certificate2

The certificate whose private key is used to encrypt and decrypt.

The certificate whose private key will be used as the default encryption and decryption key. Initializes the DecryptionKeys and EncryptionKey properties.

Exceptions

certificate is null.

certificate does not have a private key.

-or-

The private key is not RSA.

Applies to