ISecure Mime Context Interface
An interface for a Secure MIME (S/MIME) cryptography context.
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 ISecureMimeContext : ICryptographyContext,
IDisposable- Implements
- ICryptographyContext, IDisposable
Remarks
Generally speaking, applications should not use a ISecureMimeContext
directly, but rather via higher level APIs such as MultipartSigned
and ApplicationPkcs7Mime.
Properties
| EnabledEncryptionAlgorithms |
Get the enabled encryption algorithms in ranked order.
(Inherited from ICryptographyContext) |
| EncryptionProtocol |
Get the encryption protocol.
(Inherited from ICryptographyContext) |
| KeyExchangeProtocol |
Get the key exchange protocol.
(Inherited from ICryptographyContext) |
| MaxDecompressedSize | Get or set the maximum decompressed CMS content size in bytes. |
| PrepareBeforeSigning |
Get or set whether a MimeEntity should be prepared before signing.
(Inherited from ICryptographyContext) |
| SignatureProtocol |
Get the signature protocol.
(Inherited from ICryptographyContext) |
Methods
| CanEncrypt |
Check whether the cryptography context can encrypt to a particular recipient.
(Inherited from ICryptographyContext) |
| CanEncryptAsync |
Asynchronously check whether the cryptography context can encrypt to a particular recipient.
(Inherited from ICryptographyContext) |
| CanSign |
Check whether a particular mailbox address can be used for signing.
(Inherited from ICryptographyContext) |
| CanSignAsync |
Asynchronously check whether a particular mailbox address can be used for signing.
(Inherited from ICryptographyContext) |
| Compress | Compress the specified stream. |
| CompressAsync | Asynchronously compress the specified stream. |
| Decompress | Decompress the specified stream. |
| DecompressAsync | Asynchronously decompress the specified stream. |
| DecompressTo | Decompress the specified stream to an output stream. |
| DecompressToAsync | Asynchronously decompress the specified stream to an output stream. |
| Decrypt |
Decrypt the specified encryptedData.
(Inherited from ICryptographyContext) |
| DecryptAsync |
Asynchronously decrypt the specified encryptedData.
(Inherited from ICryptographyContext) |
| DecryptTo | Decrypts the specified encryptedData to an output stream. |
| DecryptToAsync | Asynchronously decrypts the specified encryptedData to an output stream. |
| Disable |
Disable the encryption algorithm.
(Inherited from ICryptographyContext) |
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable) |
| Enable |
Enable the encryption algorithm.
(Inherited from ICryptographyContext) |
| EncapsulatedSign(CmsSigner, Stream, CancellationToken) | Sign and encapsulate the content using the specified signer. |
| EncapsulatedSign(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) | Sign and encapsulate the content using the specified signer and digest algorithm. |
| EncapsulatedSignAsync(CmsSigner, Stream, CancellationToken) | Asynchronously sign and encapsulate the content using the specified signer. |
| EncapsulatedSignAsync(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) | Asynchronously sign and encapsulate the content using the specified signer and digest algorithm. |
| Encrypt(CmsRecipientCollection, Stream, CancellationToken) | Encrypts the specified content for the specified recipients. |
| Encrypt(IEnumerableMailboxAddress, Stream, CancellationToken) |
Encrypt the specified content for the specified recipients.
(Inherited from ICryptographyContext) |
| EncryptAsync(CmsRecipientCollection, Stream, CancellationToken) | Asynchronously encrypts the specified content for the specified recipients. |
| EncryptAsync(IEnumerableMailboxAddress, Stream, CancellationToken) |
Asynchronously encrypt the specified content for the specified recipients.
(Inherited from ICryptographyContext) |
| Export |
Exports the keys for the specified mailboxes.
(Inherited from ICryptographyContext) |
| ExportAsync |
Asynchronously exports the keys for the specified mailboxes.
(Inherited from ICryptographyContext) |
| GetDigestAlgorithm |
Get the digest algorithm from the micalg parameter value in a multipart/signed part.
(Inherited from ICryptographyContext) |
| GetDigestAlgorithmName |
Get the string name of the digest algorithm for use with the micalg parameter of a multipart/signed part.
(Inherited from ICryptographyContext) |
| Import(Stream, CancellationToken) |
Imports the public certificates or keys from the specified stream.
(Inherited from ICryptographyContext) |
| Import(X509Certificate2, CancellationToken) | Import a certificate. |
| Import(Stream, String, CancellationToken) | Imports certificates and keys from a pkcs12-encoded stream. |
| Import(String, String, CancellationToken) | Imports certificates and keys from a pkcs12 file. |
| ImportAsync(Stream, CancellationToken) |
Asynchronously imports the public certificates or keys from the specified stream.
(Inherited from ICryptographyContext) |
| ImportAsync(X509Certificate2, CancellationToken) | Asynchronously import a certificate. |
| ImportAsync(Stream, String, CancellationToken) | Asynchronously imports certificates and keys from a pkcs12-encoded stream. |
| ImportAsync(String, String, CancellationToken) | Asynchronously imports certificates and keys from a pkcs12 file. |
| IsEnabled |
Check whether the specified encryption algorithm is enabled.
(Inherited from ICryptographyContext) |
| Sign(CmsSigner, Stream, CancellationToken) | Sign the content using the specified signer. |
| Sign(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) |
Sign the content using the specified signer and digest algorithm.
(Inherited from ICryptographyContext) |
| SignAsync(CmsSigner, Stream, CancellationToken) | Asynchronously sign the content using the specified signer. |
| SignAsync(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) |
Asynchronously sign the content using the specified signer and digest algorithm.
(Inherited from ICryptographyContext) |
| Supports |
Check whether the specified protocol is supported by the ICryptographyContext.
(Inherited from ICryptographyContext) |
| Verify(Stream, Stream, CancellationToken) |
Verify the specified content using the detached signatureData.
(Inherited from ICryptographyContext) |
| Verify(Stream, DigitalSignatureCollection, CancellationToken) | Verify the digital signatures of the specified signed data and extract the original content. |
| Verify(Stream, MimeEntity, CancellationToken) | Verify the digital signatures of the specified signed data and extract the original content. |
| VerifyAsync |
Asynchronously verify the specified content using the detached signatureData.
(Inherited from ICryptographyContext) |