Open Pgp ContextImport(Stream, Cancellation Token) Method
Import public pgp keys from the specified stream.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public override void Import(
Stream stream,
CancellationToken cancellationToken = default
)Parameters
- stream Stream
- The raw key data.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Implements
ICryptographyContextImport(Stream, CancellationToken)Remarks
Imports public pgp keys from the specified stream.
Exceptions
| ArgumentNullException | stream is . |
| IOException |
An error occurred while parsing the raw key-ring data -or- An error occured while saving the public key-ring bundle. |
| OperationCanceledException | The operation was canceled via the cancellation token. |