SignAsync(Stream, IPdfSigner, PdfSignatureOptions?, CancellationToken) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Signs the document and writes the signed file to stream, signing and writing asynchronously.

public Task SignAsync(Stream stream, IPdfSigner signer, PdfSignatureOptions? options = null, CancellationToken cancellationToken = default(CancellationToken))

Parameters

stream
Stream

Where to write, from its current position. It is not disposed.

options
PdfSignatureOptions

The field, the signature properties and the digest algorithm; null for the defaults.

cancellationToken
CancellationToken

Cancels the signing and the writes.

Returns

Task
A task that completes when the signed file is written.

Remarks

ISO 32000-2 §12.8.1, §12.8.3.3 and §12.8.3.4. Writes what Sign(Stream, IPdfSigner, PdfSignatureOptions?) writes; only the signer call and the writes to stream are asynchronous. A cancelled or failed signer leaves the document as it was.