RsaSignatureCookieTransform Constructor (X509Certificate2)

.NET Framework (current version)

Initializes a new instance of the RsaSignatureCookieTransform class by using the private key of the specified certificate.

Namespace:   System.IdentityModel
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public RsaSignatureCookieTransform(
	X509Certificate2 certificate


Type: System.Security.Cryptography.X509Certificates.X509Certificate2

The certificate whose private key is to be used for signing and verifying.

Exception Condition

certificate is null.


certificate has no private key


The private key of the certificate is not an RSA key.

The SigningKey property is initialized to private key of the certificate. The VerificationKeys property is initialized to a collection that contains the private key of the certificate as its only element.

.NET Framework
Available since 4.5
Return to top