Table of Contents

Interface IPdfSignatureProvider

Namespace
DocWright.Signatures
Assembly
DocWright.Signatures.dll

Produces the detached PKCS#7/CMS blob a PDF signature carries.

public interface IPdfSignatureProvider

Remarks

Separate from ISignatureProvider because the two return different things. An XML signature carries a bare signature value; a PDF signature's /Contents is a full CMS SignedData structure carrying the signer's certificate, the digest algorithm, the signed attributes and the signature.

The host builds it, and that is the point. The host already holds the private key and the certificate chain, and SignedCms makes it a few lines. The alternative — DocWright hand-encoding CMS DER from a raw signature — is the same trap as hand-rolling canonicalization: an encoding that is subtly wrong verifies against nothing, and there is no reason to take that risk to save a caller five lines.

Methods

CreateDetachedCms(byte[], SignatureHashAlgorithm)

Returns a DER-encoded, detached PKCS#7/CMS SignedData over data.