Class PdfTimeStampSigner
- Namespace
- PdfSharp.Pdf.Signatures
- Assembly
- PdfSharp.Cryptography.dll
Adds a document time-stamp (ISO 32000-2 12.8.5, /SubFilter /ETSI.RFC3161): an RFC 3161 time-stamp token from a
time-stamp authority over the bytes the signature covers. It shows that the document, with its signatures and
its validation data, existed at that time; PAdES B-LTA adds one after the validation data (ETSI EN 319 142-1).
Use it with DigitalSignatureHandler.ForDocument and no field name, certification or rectangle: a
document time-stamp is an invisible new field. Needs .NET 8 or later.
public class PdfTimeStampSigner : IDigitalSigner, IDigitalSignerFormat
- Inheritance
-
objectPdfTimeStampSigner
- Implements
Constructors
- PdfTimeStampSigner(Func<byte[], Task<byte[]>>, PdfMessageDigestType)
Creates a signer that sends its requests through a function of your own, for example to add authentication or to use a test authority. The function gets a DER-encoded TimeStampReq and returns the DER-encoded TimeStampResp.
- PdfTimeStampSigner(Uri, PdfMessageDigestType)
Creates a signer that posts its requests to a time-stamp authority over HTTP.
Properties
- CertificateName
Gets a name for the time-stamp. A document time-stamp has no appearance, so it is not shown.
- Format
Gets DocumentTimeStamp.
- TimeStampReserve
Gets the number of bytes reserved for the authority's token; set it when creating the signer. The default, 16384, holds a token with its authority's certificate chain. Saving fails if a token is larger.
Methods
- GetSignatureAsync(Stream)
Gets a time-stamp token over the bytes of the stream, the bytes the document time-stamp covers.
- GetSignatureSizeAsync()
Gets the size reserved for the token.