Click or drag to resize
MimeKit

CryptographyContextImport Method

Imports the public certificates or keys from the specified stream.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
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.
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
Imports the public certificates or keys from the specified stream.
See Also