Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Security.​Cryptography.​X509Certificates.​ECDsaCertificateExtensions
Assembly: System.Security.Cryptography
Inheritance: object → ECDsaCertificateExtensions
Provides extension methods for retrieving <see cref="T:System.Security.Cryptography.ECDsa" /> implementations for the public and private keys of a <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> certificate.
Methods
public static
X509Certificate2
CopyWithPrivateKey​(X509Certificate2 certificate,
ECDsa privateKey)
Combines a private key with the public key of an <see cref="T:System.Security.Cryptography.ECDsa" /> certificate to generate a new ECDSA certificate.
Returns A new ECDSA certificate with the <see cref="P:System.Security.Cryptography.X509Certificates.X509Certificate2.HasPrivateKey" /> property set to <see langword="true" /> . The input ECDSA certificate object isn't modified.
certificate
The ECDSA certificate.
privateKey
The private ECDSA key.
public static
ECDsa
GetECDsaPrivateKey​(X509Certificate2 certificate)
Gets the <see cref="T:System.Security.Cryptography.ECDsa" /> private key from the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> certificate.
Returns The private key, or <see langword="null" /> if the certificate does not have an ECDsa private key.
certificate
The certificate.
public static
ECDsa
GetECDsaPublicKey​(X509Certificate2 certificate)
Gets the <see cref="T:System.Security.Cryptography.ECDsa" /> public key from the <see cref="T:System.Security.Cryptography.X509Certificates.X509Certificate2" /> certificate.
Returns The public key, or <see langword="null" /> if the certificate does not have an ECDsa public key.
certificate
The certificate.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object