Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RSACertificateExtensions::GetRSAPrivateKey Method (X509Certificate2^)

 

Gets the RSA private key from the X509Certificate2.

Namespace:   System.Security.Cryptography.X509Certificates
Assembly:  System.Core (in System.Core.dll)

public:
[ExtensionAttribute]
static RSA^ GetRSAPrivateKey(
	X509Certificate2^ certificate
)

Parameters

certificate
Type: System.Security.Cryptography.X509Certificates::X509Certificate2^

The certificate.

Return Value

Type: System.Security.Cryptography::RSA^

The private key, or null if the certificate does not have an RSA private key.

Exception Condition
ArgumentNullException

certificate is null.

.NET Framework
Available since 4.6
Return to top
Show:
© 2017 Microsoft