Click or drag to resize
MimeKit

OpenPgpContextGetSecretKey Method

Get the secret key for a specified key identifier.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
protected abstract PgpSecretKey GetSecretKey(
	long keyId,
	CancellationToken cancellationToken
)

Parameters

keyId  Int64
The key identifier for the desired secret key.
cancellationToken  CancellationToken
The cancellation token.

Return Value

PgpSecretKey
The secret key.
Exceptions
ExceptionCondition
OperationCanceledException The operation was canceled via the cancellation token.
PrivateKeyNotFoundException The secret key specified by the keyId could not be found.
Remarks
Gets the secret key for a specified key identifier.
See Also