/// <summary> /// Gets the <see cref="DSA" /> private key from the certificate or null if the certificate does not have a DSA private key. /// </summary> public static DSA GetDSAPrivateKey(this X509Certificate2 certificate) { return(certificate.GetPrivateKey <DSA>()); }
/// <summary> /// Gets the <see cref="ECDsa" /> private key from the certificate or null if the certificate does not have an ECDsa private key. /// </summary> public static ECDsa?GetECDsaPrivateKey(this X509Certificate2 certificate) { return(certificate.GetPrivateKey <ECDsa>(cert => HasECDsaKeyUsage(cert))); }
/// <summary> /// Gets the <see cref="RSA" /> private key from the certificate or null if the certificate does not have an RSA private key. /// </summary> public static RSA?GetRSAPrivateKey(this X509Certificate2 certificate) { return(certificate.GetPrivateKey <RSA>()); }
public static ECDsa GetECDsaPrivateKey(this X509Certificate2 certificate) { return(certificate.GetPrivateKey <ECDsa>()); }
/// <summary> /// Gets the <see cref="Gost3410_2012_512" /> private key from the certificate or null if the certificate does not have an Gost3410_2012_512 private key. /// </summary> public static Gost3410_2012_512 GetGost3410_2012_512PrivateKey(this X509Certificate2 certificate) { return(certificate.GetPrivateKey <Gost3410_2012_512>()); }
/// <summary> /// Gets the <see cref="Gost3410" /> private key from the certificate or null if the certificate does not have an Gost3410 private key. /// </summary> public static Gost3410 GetGost3410PrivateKey(this X509Certificate2 certificate) { return(certificate.GetPrivateKey <Gost3410>()); }