Class DocTimeStampWriter
- Namespace
- SimpleSign.PAdES.Signing
- Assembly
- SimpleSign.PAdES.dll
Writes a document-level timestamp (DocTimeStamp) as an incremental PDF update.
The DocTimeStamp is a signature field with /SubFilter /ETSI.RFC3161 whose
/Contents is an RFC 3161 TimeStampToken covering the entire document.
This is the final step for PAdES-B-LTA (archival) compliance.
public static class DocTimeStampWriter
- Inheritance
-
DocTimeStampWriter
- Inherited Members
Fields
DefaultTimestampReservedBytes
Default bytes reserved for the timestamp token hex in /Contents (32 KB). Timestamp tokens are typically 4–8 KB; 32 KB provides ample margin.
public const int DefaultTimestampReservedBytes = 32768
Field Value
Methods
AppendDocTimeStampAsync(byte[], string, HttpClient, HashAlgorithmName?, CancellationToken)
Appends a document-level timestamp to a signed PDF with embedded DSS/LTV data. The timestamp covers the entire document up to the /Contents placeholder, providing archival-grade proof that the DSS data existed at timestamp time.
public static Task<byte[]> AppendDocTimeStampAsync(byte[] signedPdf, string tsaUrl, HttpClient httpClient, HashAlgorithmName? hashAlgorithm = null, CancellationToken cancellationToken = default)
Parameters
signedPdfbyte[]The signed PDF bytes (with DSS already embedded).
tsaUrlstringThe TSA (Timestamp Authority) URL.
httpClientHttpClientHttpClient for TSA communication.
hashAlgorithmHashAlgorithmName?Hash algorithm (default: SHA-256).
cancellationTokenCancellationTokenCancellation token.