Application Pkcs 7Mime(Secure Mime Type, Stream) Constructor
Initialize a new instance of the ApplicationPkcs7Mime class.
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 ApplicationPkcs7Mime(
SecureMimeType type,
Stream stream
)Parameters
- type SecureMimeType
- The S/MIME type.
- stream Stream
- The content stream.
Remarks
Creates a new MIME part with a Content-Type of application/pkcs7-mime and the stream as its content.
Unless you are writing your own pkcs7 implementation, you'll probably want to use the Compress(MimeEntity, CancellationToken), Encrypt(CmsRecipientCollection, MimeEntity, CancellationToken), and/or Sign(CmsSigner, MimeEntity, CancellationToken) method to create new instances of this class.
Exceptions
| ArgumentNullException | stream is . |
| ArgumentOutOfRangeException | type is not a valid value. |
| ArgumentException |
stream does not support reading. -or- stream does not support seeking. |