Click or drag to resize
MimeKit

X509Certificate2ExtensionsGetPrivateKeyAsAsymmetricKeyParameter Method

Get the PrivateKey property as a BouncyCastle AsymmetricKeyParameter.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public static AsymmetricKeyParameter GetPrivateKeyAsAsymmetricKeyParameter(
	this X509Certificate2 certificate
)

Parameters

certificate  X509Certificate2
The X.509 certificate.

Return Value

AsymmetricKeyParameter
The asymmetric key parameter.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type X509Certificate2. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptioncertificate is null.
Remarks
Gets the PrivateKey property as a BouncyCastle AsymmetricKeyParameter.
See Also