Cryptography ContextCreate Method
Creates a new CryptographyContext for the specified protocol.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
The CryptographyContext for the protocol.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public static CryptographyContext Create(
string protocol
)Parameters
- protocol String
- The protocol.
Return Value
CryptographyContextThe CryptographyContext for the 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.
Exceptions
| ArgumentNullException | protocol is . |
| NotSupportedException | There are no supported CryptographyContexts that support the specified protocol. |