Click or drag to resize
MimeKit

CryptographyContextCreate Method

Creates a new CryptographyContext for the specified protocol.

Namespace:  MimeKit.Cryptography
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public static CryptographyContext Create(
	string protocol
)

Parameters

protocol
Type: SystemString
The protocol.

Return Value

Type: CryptographyContext
The CryptographyContext for the protocol.
Exceptions
ExceptionCondition
ArgumentNullExceptionprotocol is null.
NotSupportedException There are no supported CryptographyContexts that support the specified protocol.
Remarks

Creates a new CryptographyContext for the specified protocol.

The default CryptographyContext types can over overridden by calling the Register(Type) method with the preferred type.

See Also