ICryptography Context Interface
An abstract cryptography context interface.
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 interface ICryptographyContext : IDisposable- Implements
- IDisposable
Remarks
Generally speaking, applications should not use a ICryptographyContext
directly, but rather via higher level APIs such as MultipartSigned,
MultipartEncrypted and ApplicationPkcs7Mime.
Properties
| EnabledEncryptionAlgorithms | Get the enabled encryption algorithms in ranked order. |
| EncryptionProtocol | Get the encryption protocol. |
| KeyExchangeProtocol | Get the key exchange protocol. |
| PrepareBeforeSigning | Get or set whether a MimeEntity should be prepared before signing. |
| SignatureProtocol | Get the signature protocol. |
Methods
| CanEncrypt | Check whether the cryptography context can encrypt to a particular recipient. |
| CanEncryptAsync | Asynchronously check whether the cryptography context can encrypt to a particular recipient. |
| CanSign | Check whether a particular mailbox address can be used for signing. |
| CanSignAsync | Asynchronously check whether a particular mailbox address can be used for signing. |
| Decrypt | Decrypt the specified encryptedData. |
| DecryptAsync | Asynchronously decrypt the specified encryptedData. |
| Disable | Disable the encryption algorithm. |
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable) |
| Enable | Enable the encryption algorithm. |
| Encrypt | Encrypt the specified content for the specified recipients. |
| EncryptAsync | Asynchronously encrypt the specified content for the specified recipients. |
| Export | Exports the keys for the specified mailboxes. |
| ExportAsync | Asynchronously exports the keys for the specified mailboxes. |
| GetDigestAlgorithm | Get the digest algorithm from the micalg parameter value in a multipart/signed part. |
| GetDigestAlgorithmName | Get the string name of the digest algorithm for use with the micalg parameter of a multipart/signed part. |
| Import | Imports the public certificates or keys from the specified stream. |
| ImportAsync | Asynchronously imports the public certificates or keys from the specified stream. |
| IsEnabled | Check whether the specified encryption algorithm is enabled. |
| Sign | Sign the content using the specified signer and digest algorithm. |
| SignAsync | Asynchronously sign the content using the specified signer and digest algorithm. |
| Supports | Check whether the specified protocol is supported by the ICryptographyContext. |
| Verify | Verify the specified content using the detached signatureData. |
| VerifyAsync | Asynchronously verify the specified content using the detached signatureData. |