Click or drag to resize
MimeKit

ISecureMimeContext Interface

An interface for a Secure MIME (S/MIME) cryptography context.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public interface ISecureMimeContext : ICryptographyContext, 
	IDisposable

The ISecureMimeContext type exposes the following members.

Properties
 NameDescription
Public propertyEnabledDigestAlgorithms Get the enabled digest algorithms in ranked order.
(Inherited from ICryptographyContext)
Public propertyEnabledEncryptionAlgorithms Get the enabled encryption algorithms in ranked order.
(Inherited from ICryptographyContext)
Public propertyEncryptionProtocol Get the encryption protocol.
(Inherited from ICryptographyContext)
Public propertyKeyExchangeProtocol Get the key exchange protocol.
(Inherited from ICryptographyContext)
Public propertyPrepareBeforeSigning Get or set whether a MimeEntity should be prepared before signing.
(Inherited from ICryptographyContext)
Public propertySignatureProtocol Get the signature protocol.
(Inherited from ICryptographyContext)
Top
Methods
 NameDescription
Public methodCanEncrypt Check whether or not the cryptography context can encrypt to a particular recipient.
(Inherited from ICryptographyContext)
Public methodCanEncryptAsync Asynchronously check whether or not the cryptography context can encrypt to a particular recipient.
(Inherited from ICryptographyContext)
Public methodCanSign Check whether or not a particular mailbox address can be used for signing.
(Inherited from ICryptographyContext)
Public methodCanSignAsync Asynchronously check whether or not a particular mailbox address can be used for signing.
(Inherited from ICryptographyContext)
Public methodCompress Compress the specified stream.
Public methodCompressAsync Asynchronously compress the specified stream.
Public methodDecompress Decompress the specified stream.
Public methodDecompressAsync Asynchronously decompress the specified stream.
Public methodDecompressTo Decompress the specified stream to an output stream.
Public methodDecompressToAsync Asynchronously decompress the specified stream to an output stream.
Public methodDecrypt Decrypt the specified encryptedData.
(Inherited from ICryptographyContext)
Public methodDecryptAsync Asynchronously decrypt the specified encryptedData.
(Inherited from ICryptographyContext)
Public methodDecryptTo Decrypts the specified encryptedData to an output stream.
Public methodDecryptToAsync Asynchronously decrypts the specified encryptedData to an output stream.
Public methodDisable(DigestAlgorithm) Disable the digest algorithm.
(Inherited from ICryptographyContext)
Public methodDisable(EncryptionAlgorithm) Disable the encryption algorithm.
(Inherited from ICryptographyContext)
Public methodDispose
(Inherited from IDisposable)
Public methodEnable(DigestAlgorithm) Enable the digest algorithm.
(Inherited from ICryptographyContext)
Public methodEnable(EncryptionAlgorithm) Enable the encryption algorithm.
(Inherited from ICryptographyContext)
Public methodEncapsulatedSign(CmsSigner, Stream, CancellationToken) Sign and encapsulate the content using the specified signer.
Public methodEncapsulatedSign(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) Sign and encapsulate the content using the specified signer and digest algorithm.
Public methodEncapsulatedSignAsync(CmsSigner, Stream, CancellationToken) Asynchronously sign and encapsulate the content using the specified signer.
Public methodEncapsulatedSignAsync(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) Asynchronously sign and encapsulate the content using the specified signer and digest algorithm.
Public methodEncrypt(CmsRecipientCollection, Stream, CancellationToken) Encrypts the specified content for the specified recipients.
Public methodEncrypt(IEnumerableMailboxAddress, Stream, CancellationToken) Encrypt the specified content for the specified recipients.
(Inherited from ICryptographyContext)
Public methodEncryptAsync(CmsRecipientCollection, Stream, CancellationToken) Asynchronously encrypts the specified content for the specified recipients.
Public methodEncryptAsync(IEnumerableMailboxAddress, Stream, CancellationToken) Asynchronously encrypt the specified content for the specified recipients.
(Inherited from ICryptographyContext)
Public methodExport Exports the keys for the specified mailboxes.
(Inherited from ICryptographyContext)
Public methodExportAsync Asynchronously exports the keys for the specified mailboxes.
(Inherited from ICryptographyContext)
Public methodGetDigestAlgorithm Get the digest algorithm from the micalg parameter value in a multipart/signed part.
(Inherited from ICryptographyContext)
Public methodGetDigestAlgorithmName Get the string name of the digest algorithm for use with the micalg parameter of a multipart/signed part.
(Inherited from ICryptographyContext)
Public methodImport(Stream, CancellationToken) Imports the public certificates or keys from the specified stream.
(Inherited from ICryptographyContext)
Public methodImport(X509Certificate2, CancellationToken) Import a certificate.
Public methodImport(Stream, String, CancellationToken) Imports certificates and keys from a pkcs12-encoded stream.
Public methodImport(String, String, CancellationToken) Imports certificates and keys from a pkcs12 file.
Public methodImportAsync(Stream, CancellationToken) Asynchronously imports the public certificates or keys from the specified stream.
(Inherited from ICryptographyContext)
Public methodImportAsync(X509Certificate2, CancellationToken) Asynchronously import a certificate.
Public methodImportAsync(Stream, String, CancellationToken) Asynchronously imports certificates and keys from a pkcs12-encoded stream.
Public methodImportAsync(String, String, CancellationToken) Asynchronously imports certificates and keys from a pkcs12 file.
Public methodIsEnabled(DigestAlgorithm) Check whether the specified digest algorithm is enabled.
(Inherited from ICryptographyContext)
Public methodIsEnabled(EncryptionAlgorithm) Check whether the specified encryption algorithm is enabled.
(Inherited from ICryptographyContext)
Public methodSign(CmsSigner, Stream, CancellationToken) Sign the content using the specified signer.
Public methodSign(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) Sign the content using the specified signer and digest algorithm.
(Inherited from ICryptographyContext)
Public methodSignAsync(CmsSigner, Stream, CancellationToken) Asynchronously sign the content using the specified signer.
Public methodSignAsync(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) Asynchronously sign the content using the specified signer and digest algorithm.
(Inherited from ICryptographyContext)
Public methodSupports Check whether or not the specified protocol is supported by the ICryptographyContext.
(Inherited from ICryptographyContext)
Public methodVerify(Stream, Stream, CancellationToken) Verify the specified content using the detached signatureData.
(Inherited from ICryptographyContext)
Public methodVerify(Stream, DigitalSignatureCollection, CancellationToken) Verify the digital signatures of the specified signed data and extract the original content.
Public methodVerify(Stream, MimeEntity, CancellationToken) Verify the digital signatures of the specified signed data and extract the original content.
Public methodVerifyAsync Asynchronously verify the specified content using the detached signatureData.
(Inherited from ICryptographyContext)
Top
Remarks
Generally speaking, applications should not use a ISecureMimeContext directly, but rather via higher level APIs such as MultipartSigned and ApplicationPkcs7Mime.
See Also