Click or drag to resize
MimeKit

CryptographyContextImportAsync Method

Asynchronously imports the public certificates or keys from the specified stream.

Namespace:  MimeKit.Cryptography
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public abstract Task ImportAsync(
	Stream stream,
	CancellationToken cancellationToken = default
)

Parameters

stream
Type: System.IOStream
The raw certificate or key data.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: Task
An asynchronous task context.
Exceptions
ExceptionCondition
ArgumentNullExceptionstream is null.
NotSupportedException Importing keys is not supported by this cryptography context.
OperationCanceledException The operation was cancelled via the cancellation token.
Remarks
Asynchronously imports the public certificates or keys from the specified stream.
See Also