System.Security.Cryptography.X509Certificates.X509Certificate2.PublicKey Property

Gets a X509Certificate2.PublicKey object associated with a certificate.

Syntax

public PublicKey PublicKey { get; }

Value

Documentation for this section has not yet been entered.

Remarks

This property returns a X509Certificate2.PublicKey object, which contains the object identifier (System.Security.Cryptography.Oid) representing the public key algorithm, the ASN.1-encoded parameters, and the ASN.1-encoded key value.

You can also obtain the key as an System.Security.Cryptography.AsymmetricAlgorithm object by referencing the X509Certificate2.PublicKey property. This property supports only RSA or DSA keys, so it returns either an System.Security.Cryptography.RSACryptoServiceProvider or a System.Security.Cryptography.DSACryptoServiceProvider object that represents the public key.

Requirements

Namespace: System.Security.Cryptography.X509Certificates
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0