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.
Assembly: System.Core (in System.Core.dll)
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
Available since 4.6
Show: