Click or drag to resize
MimeKit

ApplicationPkcs7Mime(SecureMimeType, Stream) Constructor

Initialize a new instance of the ApplicationPkcs7Mime class.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public ApplicationPkcs7Mime(
	SecureMimeType type,
	Stream stream
)

Parameters

type  SecureMimeType
The S/MIME type.
stream  Stream
The content stream.
Exceptions
ExceptionCondition
ArgumentNullExceptionstream is null.
ArgumentOutOfRangeExceptiontype is not a valid value.
ArgumentException

stream does not support reading.

-or-

stream does not support seeking.

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.

See Also