Click or drag to resize
MimeKit

BouncyCastleSecureMimeContext Class

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

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

The BouncyCastleSecureMimeContext type exposes the following members.

Constructors
 NameDescription
Protected methodBouncyCastleSecureMimeContext Initialize a new instance of the SecureMimeContext class.
Protected methodBouncyCastleSecureMimeContext(SecureRandom) Initialize a new instance of the SecureMimeContext class.
Top
Properties
 NameDescription
Public propertyCheckCertificateRevocation Get or set whether or not certificate revocation lists should be downloaded when verifying signatures.
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 a MimeEntity should be prepared before signing.
(Inherited from CryptographyContext)
Protected propertyRandomNumberGenerator Get the pseudo-random number generator.
Public propertySignatureProtocol Get the signature protocol.
(Inherited from SecureMimeContext)
Top
Methods
 NameDescription
Protected methodBuildCertificateChain Build a certificate chain.
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.
(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 specified encryptedData.
(Overrides CryptographyContextDecrypt(Stream, CancellationToken))
Public methodDecryptAsync Asynchronously decrypt the specified encryptedData.
(Overrides CryptographyContextDecryptAsync(Stream, CancellationToken))
Public methodDecryptTo Decrypt the specified encryptedData to an output stream.
(Overrides SecureMimeContextDecryptTo(Stream, Stream, CancellationToken))
Public methodDecryptToAsync Asynchronously decrypt 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 all resources used by the BouncyCastleSecureMimeContext object.
(Overrides CryptographyContextDispose(Boolean))
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 and digest algorithm.
(Overrides SecureMimeContextEncapsulatedSign(MailboxAddress, DigestAlgorithm, Stream, CancellationToken))
Public methodEncapsulatedSignAsync(CmsSigner, Stream, CancellationToken) Asynchronously signs 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 and digest algorithm.
(Overrides SecureMimeContextEncapsulatedSignAsync(MailboxAddress, DigestAlgorithm, Stream, CancellationToken))
Public methodEncrypt(CmsRecipientCollection, Stream, CancellationToken) Encrypt the specified content for the specified recipients.
(Overrides SecureMimeContextEncrypt(CmsRecipientCollection, Stream, CancellationToken))
Public methodEncrypt(IEnumerableMailboxAddress, Stream, CancellationToken) Encrypt the specified content for the specified recipients.
(Overrides CryptographyContextEncrypt(IEnumerableMailboxAddress, Stream, CancellationToken))
Public methodEncryptAsync(CmsRecipientCollection, Stream, CancellationToken) Asynchronously encrypt the specified content for the specified recipients.
(Overrides SecureMimeContextEncryptAsync(CmsRecipientCollection, Stream, CancellationToken))
Public methodEncryptAsync(IEnumerableMailboxAddress, Stream, CancellationToken) Asynchronously encrypt the specified content for the specified recipients.
(Overrides CryptographyContextEncryptAsync(IEnumerableMailboxAddress, Stream, CancellationToken))
Public methodEquals
(Inherited from Object)
Public methodExport Export 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 methodGetCertificate Get the X.509 certificate matching the specified selector.
Protected methodGetCertificateRevocationLists Get the certificate revocation lists.
Protected methodGetCmsRecipient Get the CmsRecipient for the specified mailbox.
Protected methodGetCmsRecipients Get a collection of CmsRecipients for the specified mailboxes.
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 methodGetIntermediateCertificates Get the intermediate certificates.
Protected methodGetNextCertificateRevocationListUpdate Get the date & time for the next scheduled certificate revocation list update for the specified issuer.
Protected methodGetPreferredEncryptionAlgorithm Get the preferred encryption algorithm to use for encrypting to the specified recipients.
(Inherited from SecureMimeContext)
Protected methodGetPrivateKey Get the private key for the certificate matching the specified selector.
Protected methodGetTrustedAnchors Get the trusted anchors.
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.
(Inherited from SecureMimeContext)
Public methodImport(X509Certificate2, CancellationToken) Import a certificate.
(Inherited from SecureMimeContext)
Public methodImport(X509Crl, CancellationToken) Import a certificate revocation list.
(Inherited from SecureMimeContext)
Public methodImport(Stream, String, CancellationToken) Imports certificates and keys from a pkcs12-encoded stream.
(Inherited from SecureMimeContext)
Public methodImport(String, String, CancellationToken) Imports certificates and keys from a pkcs12 file.
(Inherited from SecureMimeContext)
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 imports certificates and keys from a pkcs12-encoded stream.
(Inherited from SecureMimeContext)
Public methodImportAsync(String, String, CancellationToken) Asynchronously imports certificates and keys from a pkcs12 file.
(Inherited from SecureMimeContext)
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 and digest algorithm.
(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 and digest algorithm.
(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 AlgorithmIdentifier to a DigestAlgorithm.
Protected methodStatic memberTryGetEncryptionAlgorithm Attempts to map a AlgorithmIdentifier to a EncryptionAlgorithm.
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 abstract S/MIME context built around the BouncyCastle API.
See Also