WindowsSecureMimeContextEncapsulatedSign(CmsSigner, Stream, CancellationToken) Method

Sign and encapsulate the content using the specified signer.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public override ApplicationPkcs7Mime EncapsulatedSign(
	CmsSigner signer,
	Stream content,
	CancellationToken cancellationToken = default
)

Parameters

signer  CmsSigner
The signer.
content  Stream
The content.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

ApplicationPkcs7Mime
A new ApplicationPkcs7Mime instance containing the detached signature data.

Implements

ISecureMimeContextEncapsulatedSign(CmsSigner, Stream, CancellationToken)

Remarks

Signs and encapsulates the content using the specified signer.

Exceptions

ArgumentNullException

signer is .

-or-

content is .

OperationCanceledException The operation was canceled via the cancellation token.
CryptographicException An error occurred in the cryptographic message syntax subsystem.

See Also