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::GetRSAPublicKey Method (X509Certificate2^)

 

Gets the RSA public key from the X509Certificate2.

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

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

Parameters

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

The certificate.

Return Value

Type: System.Security.Cryptography::RSA^

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

Exception Condition
ArgumentNullException

certificate is null.

CryptographicException

Windows reports an error. See the Message property for more information.

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