Cryptography ContextImport Method
Imports the public certificates or 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 abstract void Import(
Stream stream,
CancellationToken cancellationToken = default
)Parameters
- stream Stream
- The raw certificate or key data.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Implements
ICryptographyContextImport(Stream, CancellationToken)Remarks
Imports the public certificates or keys from the specified stream.
Exceptions
| ArgumentNullException | stream is . |
| NotSupportedException | Importing keys is not supported by this cryptography context. |
| OperationCanceledException | The operation was cancelled via the cancellation token. |