Class PdfSigningSession
A prepared, not-yet-completed signing pass, produced by BeginSign(byte[], PdfSigningOptions, CancellationToken): the document already carries its incremental signing revision with a placeholder signature value, and this session reports what must be signed and embeds the resulting container.
public sealed class PdfSigningSession
- Inheritance
-
PdfSigningSession
- Inherited Members
Remarks
This is the seam for external signing: hand GetDigest() (or the signed byte ranges) to whatever produces the CMS container (an HSM, a signing service, another process), then call Complete(byte[]) with the DER bytes. The private key never has to enter this process.
Properties
- ByteRange
Gets the signature's /ByteRange: two (offset, length) pairs covering every byte of the prepared file except the placeholder signature value.
Methods
- Complete(byte[])
Embeds the DER CMS container into the placeholder and returns the finished document. The prepared bytes are never mutated; every call returns a fresh copy, so a failed external signature can simply be retried.
- GetDigest()
Computes the SHA-256 digest over the signed byte ranges: the value a detached CMS container must attest.