OpenPgpContextGetPrivateKey Method

Gets the private key from the specified secret key.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
protected PgpPrivateKey GetPrivateKey(
	PgpSecretKey key
)

Parameters

key  PgpSecretKey
The secret key.

Return Value

PgpPrivateKey
The private key.

Remarks

Gets the private key from the specified secret key.

Exceptions

ArgumentNullException key is .
OperationCanceledException The user chose to cancel the password prompt.
UnauthorizedAccessException 3 bad attempts were made to unlock the secret key.

See Also