Click or drag to resize
MimeKit

WindowsSecureMimeContext Class

A Secure MIME (S/MIME) cryptography context.
Inheritance Hierarchy
SystemObject
  MimeKit.CryptographyCryptographyContext
    MimeKit.CryptographySecureMimeContext
      MimeKit.CryptographyWindowsSecureMimeContext

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public class WindowsSecureMimeContext : SecureMimeContext

The WindowsSecureMimeContext type exposes the following members.

Constructors
 NameDescription
Public methodWindowsSecureMimeContext Initialize a new instance of the WindowsSecureMimeContext class.
Public methodWindowsSecureMimeContext(StoreLocation) Initialize a new instance of the WindowsSecureMimeContext 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.
(Inherited from SecureMimeContext)
Public propertyKeyExchangeProtocol Get the key exchange protocol.
(Inherited from SecureMimeContext)
Public propertyPrepareBeforeSigning Get or set whether MimeEntitys should be prepared before signing.
(Inherited from CryptographyContext)
Public propertySignatureProtocol Get the signature protocol.
(Inherited from SecureMimeContext)
Public propertyStoreLocation Gets the X.509 store location.
Top
Methods
 NameDescription
Public methodCanEncrypt Check whether or not the cryptography context can encrypt to a particular recipient.
(Overrides CryptographyContextCanEncrypt(MailboxAddress, CancellationToken))
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.
(Overrides CryptographyContextCanSign(MailboxAddress, CancellationToken))
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.
(Inherited from SecureMimeContext)
Public methodCompressAsync Asynchronously compress the specified stream.
(Inherited from SecureMimeContext)
Public methodDecompress Decompress the specified stream.
(Inherited from SecureMimeContext)
Public methodDecompressAsync Asynchronously decompress the specified stream.
(Inherited from SecureMimeContext)
Public methodDecompressTo Decompress the specified stream to an output stream.
(Inherited from SecureMimeContext)
Public methodDecompressToAsync Asynchronously decompress the specified stream to an output stream.
(Inherited from SecureMimeContext)
Public methodDecrypt Decrypt the encrypted data.
(Overrides CryptographyContextDecrypt(Stream, CancellationToken))
Public methodDecryptAsync Asynchronously decrypt the encrypted data.
(Overrides CryptographyContextDecryptAsync(Stream, CancellationToken))
Public methodDecryptTo Decrypts the specified encryptedData to an output stream.
(Overrides SecureMimeContextDecryptTo(Stream, Stream, CancellationToken))
Public methodDecryptToAsync Asynchronously decrypts the specified encryptedData to an output stream.
(Overrides SecureMimeContextDecryptToAsync(Stream, Stream, CancellationToken))
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.
(Overrides SecureMimeContextEncapsulatedSign(CmsSigner, Stream, CancellationToken))
Public methodEncapsulatedSign(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) Sign and encapsulate the content using the specified signer.
(Overrides SecureMimeContextEncapsulatedSign(MailboxAddress, DigestAlgorithm, Stream, CancellationToken))
Public methodEncapsulatedSignAsync(CmsSigner, Stream, CancellationToken) Asynchronously sign and encapsulate the content using the specified signer.
(Overrides SecureMimeContextEncapsulatedSignAsync(CmsSigner, Stream, CancellationToken))
Public methodEncapsulatedSignAsync(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) Asynchronously sign and encapsulate the content using the specified signer.
(Overrides SecureMimeContextEncapsulatedSignAsync(MailboxAddress, DigestAlgorithm, Stream, CancellationToken))
Public methodEncrypt(CmsRecipientCollection, Stream, CancellationToken) Encrypts the specified content for the specified recipients.
(Overrides SecureMimeContextEncrypt(CmsRecipientCollection, Stream, CancellationToken))
Public methodEncrypt(IEnumerableMailboxAddress, Stream, CancellationToken) Encrypts the specified content for the specified recipients.
(Overrides CryptographyContextEncrypt(IEnumerableMailboxAddress, Stream, CancellationToken))
Public methodEncryptAsync(CmsRecipientCollection, Stream, CancellationToken) Asynchronously encrypts the specified content for the specified recipients.
(Overrides SecureMimeContextEncryptAsync(CmsRecipientCollection, Stream, CancellationToken))
Public methodEncryptAsync(IEnumerableMailboxAddress, Stream, CancellationToken) Asynchronously encrypts the specified content for the specified recipients.
(Overrides CryptographyContextEncryptAsync(IEnumerableMailboxAddress, Stream, CancellationToken))
Public methodEquals
(Inherited from Object)
Public methodExport Exports the certificates for the specified mailboxes.
(Overrides CryptographyContextExport(IEnumerableMailboxAddress, CancellationToken))
Public methodExportAsync Asynchronously export the certificates for the specified mailboxes.
(Overrides CryptographyContextExportAsync(IEnumerableMailboxAddress, CancellationToken))
Protected methodFinalize
(Inherited from Object)
Protected methodGetCmsRecipient Get the CmsRecipient for the specified mailbox.
Protected methodGetCmsSigner Get the CmsSigner for the specified mailbox.
Public methodGetDigestAlgorithm Get the digest algorithm from the micalg parameter value in a multipart/signed part.
(Inherited from SecureMimeContext)
Public methodGetDigestAlgorithmName Get the string name of the digest algorithm for use with the micalg parameter of a multipart/signed part.
(Inherited from SecureMimeContext)
Public methodGetHashCode
(Inherited from Object)
Protected methodGetPreferredEncryptionAlgorithm(CmsRecipientCollection) Get the preferred encryption algorithm to use for encrypting to the specified recipients.
(Inherited from SecureMimeContext)
Protected methodGetPreferredEncryptionAlgorithm(CmsRecipientCollection) Gets the preferred encryption algorithm to use for encrypting to the specified recipients.
Protected methodGetRecipientCertificate Get the certificate for the specified recipient.
Protected methodGetSignerCertificate Get the certificate for the specified signer.
Public methodGetType
(Inherited from Object)
Public methodImport(Stream, CancellationToken) Import certificates (as from a certs-only application/pkcs-mime part) from the specified stream.
(Inherited from SecureMimeContext)
Public methodImport(X509Certificate, CancellationToken) Import a certificate.
(Overrides SecureMimeContextImport(X509Certificate, CancellationToken))
Public methodImport(X509Certificate2, CancellationToken) Import a certificate.
(Overrides SecureMimeContextImport(X509Certificate2, CancellationToken))
Public methodImport(X509Crl, CancellationToken) Import a certificate revocation list.
(Overrides SecureMimeContextImport(X509Crl, CancellationToken))
Public methodImport(StoreName, X509Certificate, CancellationToken) Import the specified certificate.
Public methodImport(StoreName, X509Certificate2, CancellationToken) Import the specified certificate.
Public methodImport(Stream, String, CancellationToken) Import certificates and keys from a pkcs12-encoded stream.
(Overrides SecureMimeContextImport(Stream, String, CancellationToken))
Public methodImport(String, String, CancellationToken) Imports certificates and keys from a pkcs12 file.
(Inherited from SecureMimeContext)
Public methodImport(Stream, String, X509KeyStorageFlags, CancellationToken) Import certificates and keys from a pkcs12-encoded stream.
Public methodImportAsync(Stream, CancellationToken) Asynchronously import certificates (as from a certs-only application/pkcs-mime part) from the specified stream.
(Inherited from SecureMimeContext)
Public methodImportAsync(X509Certificate, CancellationToken) Asynchronously import a certificate.
(Inherited from SecureMimeContext)
Public methodImportAsync(X509Certificate2, CancellationToken) Asynchronously import a certificate.
(Inherited from SecureMimeContext)
Public methodImportAsync(X509Crl, CancellationToken) Asynchronously import a certificate revocation list.
(Inherited from SecureMimeContext)
Public methodImportAsync(Stream, String, CancellationToken) Asynchronously import certificates and keys from a pkcs12-encoded stream.
(Overrides SecureMimeContextImportAsync(Stream, String, CancellationToken))
Public methodImportAsync(String, String, CancellationToken) Asynchronously imports certificates and keys from a pkcs12 file.
(Inherited from SecureMimeContext)
Public methodImportAsync(Stream, String, X509KeyStorageFlags, CancellationToken) Asynchronously import certificates and keys from a pkcs12-encoded stream.
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
(Inherited from Object)
Public methodSign(CmsSigner, Stream, CancellationToken) Sign the content using the specified signer.
(Overrides SecureMimeContextSign(CmsSigner, Stream, CancellationToken))
Public methodSign(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) Sign the content using the specified signer.
(Overrides CryptographyContextSign(MailboxAddress, DigestAlgorithm, Stream, CancellationToken))
Public methodSignAsync(CmsSigner, Stream, CancellationToken) Asynchronously sign the content using the specified signer.
(Overrides SecureMimeContextSignAsync(CmsSigner, Stream, CancellationToken))
Public methodSignAsync(MailboxAddress, DigestAlgorithm, Stream, CancellationToken) Asynchronously sign the content using the specified signer.
(Overrides CryptographyContextSignAsync(MailboxAddress, DigestAlgorithm, Stream, CancellationToken))
Public methodSupports Check whether or not the specified protocol is supported by the CryptographyContext.
(Inherited from SecureMimeContext)
Public methodToString
(Inherited from Object)
Protected methodStatic memberTryGetDigestAlgorithm Attempts to map a Oid to a DigestAlgorithm.
Protected methodUpdateSecureMimeCapabilities Updates the known S/MIME capabilities of the client used by the recipient that owns the specified certificate.
Public methodVerify(Stream, DigitalSignatureCollection, CancellationToken) Verify the digital signatures of the specified signed data and extract the original content.
(Overrides SecureMimeContextVerify(Stream, DigitalSignatureCollection, CancellationToken))
Public methodVerify(Stream, MimeEntity, CancellationToken) Verify the digital signatures of the specified signed data and extract the original content.
(Overrides SecureMimeContextVerify(Stream, MimeEntity, CancellationToken))
Public methodVerify(Stream, Stream, CancellationToken) Verify the specified content using the detached signature data.
(Overrides CryptographyContextVerify(Stream, Stream, CancellationToken))
Public methodVerifyAsync Asynchronously verify the specified content using the detached signature data.
(Overrides CryptographyContextVerifyAsync(Stream, Stream, CancellationToken))
Top
Remarks
An S/MIME cryptography context that uses X509Store for certificate storage and retrieval.
See Also