Click or drag to resize
MimeKit

SecureMimeContext Class

A Secure MIME (S/MIME) cryptography context.
Inheritance Hierarchy

Namespace:  MimeKit.Cryptography
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public abstract class SecureMimeContext : CryptographyContext

The SecureMimeContext type exposes the following members.

Constructors
  NameDescription
Protected methodSecureMimeContext
Initialize a new instance of the SecureMimeContext class.
Top
Properties
  NameDescription
Protected propertyDigestAlgorithmRank
Get the preferred rank order for the digest algorithms; from the most preferred to the least.
(Inherited from CryptographyContext.)
Public propertyEnabledDigestAlgorithms
Get the enabled digest algorithms in ranked order.
(Inherited from CryptographyContext.)
Public propertyEnabledEncryptionAlgorithms
Get the enabled encryption algorithms in ranked order.
(Inherited from CryptographyContext.)
Protected propertyEncryptionAlgorithmRank
Get the preferred rank order for the encryption algorithms; from the most preferred to the least.
(Inherited from CryptographyContext.)
Public propertyEncryptionProtocol
Get the encryption protocol.
(Overrides CryptographyContextEncryptionProtocol.)
Public propertyKeyExchangeProtocol
Get the key exchange protocol.
(Overrides CryptographyContextKeyExchangeProtocol.)
Public propertyPrepareBeforeSigning
Get or set whether MimeEntitys should be prepared before signing.
(Inherited from CryptographyContext.)
Public propertySignatureProtocol
Get the signature protocol.
(Overrides CryptographyContextSignatureProtocol.)
Top
Methods
  NameDescription
Public methodCanEncrypt
Check whether or not the cryptography context can encrypt to a particular recipient.
(Inherited from CryptographyContext.)
Public methodCanEncryptAsync
Asynchronously check whether or not the cryptography context can encrypt to a particular recipient.
(Inherited from CryptographyContext.)
Public methodCanSign
Check whether or not a particular mailbox address can be used for signing.
(Inherited from CryptographyContext.)
Public methodCanSignAsync
Asynchronously check whether or not a particular mailbox address can be used for signing.
(Inherited from CryptographyContext.)
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 CryptographyContext.)
Public methodDecryptAsync
Asynchronously decrypt the specified encryptedData.
(Inherited from CryptographyContext.)
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 CryptographyContext.)
Public methodDisable(EncryptionAlgorithm)
Disable the encryption algorithm.
(Inherited from CryptographyContext.)
Public methodDispose
Releases all resources used by the CryptographyContext object.
(Inherited from CryptographyContext.)
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the CryptographyContext and optionally releases the managed resources.
(Inherited from CryptographyContext.)
Public methodEnable(DigestAlgorithm)
Enable the digest algorithm.
(Inherited from CryptographyContext.)
Public methodEnable(EncryptionAlgorithm)
Enable the encryption algorithm.
(Inherited from CryptographyContext.)
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 CryptographyContext.)
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 CryptographyContext.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExport
Exports the keys for the specified mailboxes.
(Inherited from CryptographyContext.)
Public methodExportAsync
Asynchronously exports the keys for the specified mailboxes.
(Inherited from CryptographyContext.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetDigestAlgorithm
Get the digest algorithm from the micalg parameter value in a multipart/signed part.
(Overrides CryptographyContextGetDigestAlgorithm(String).)
Public methodGetDigestAlgorithmName
Get the string name of the digest algorithm for use with the micalg parameter of a multipart/signed part.
(Overrides CryptographyContextGetDigestAlgorithmName(DigestAlgorithm).)
Protected methodStatic memberGetDigestOid
Get the OID for the digest algorithm.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Protected methodGetPreferredEncryptionAlgorithm
Get the preferred encryption algorithm to use for encrypting to the specified recipients.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodImport(Stream, CancellationToken)
Import certificates (as from a certs-only application/pkcs-mime part) from the specified stream.
(Overrides CryptographyContextImport(Stream, CancellationToken).)
Public methodImport(X509Certificate, CancellationToken)
Import the specified certificate.
Public methodImport(X509Crl, CancellationToken)
Import the specified certificate revocation list.
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 import certificates (as from a certs-only application/pkcs-mime part) from the specified stream.
(Overrides CryptographyContextImportAsync(Stream, CancellationToken).)
Public methodImportAsync(X509Certificate, CancellationToken)
Asynchronously import the specified certificate.
Public methodImportAsync(X509Crl, CancellationToken)
Asynchronously import the specified certificate revocation list.
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 CryptographyContext.)
Public methodIsEnabled(EncryptionAlgorithm)
Check whether the specified encryption algorithm is enabled.
(Inherited from CryptographyContext.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
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 CryptographyContext.)
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 CryptographyContext.)
Public methodSupports
Check whether or not the specified protocol is supported by the CryptographyContext.
(Overrides CryptographyContextSupports(String).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodVerify(Stream, Stream, CancellationToken)
Verify the specified content using the detached signatureData.
(Inherited from CryptographyContext.)
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 CryptographyContext.)
Top
Remarks
Generally speaking, applications should not use a SecureMimeContext directly, but rather via higher level APIs such as MultipartSigned and ApplicationPkcs7Mime.
See Also