Table of Contents

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

int

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

signedPdf byte[]

The signed PDF bytes (with DSS already embedded).

tsaUrl string

The TSA (Timestamp Authority) URL.

httpClient HttpClient

HttpClient for TSA communication.

hashAlgorithm HashAlgorithmName?

Hash algorithm (default: SHA-256).

cancellationToken CancellationToken

Cancellation token.

Returns

Task<byte[]>

The PDF bytes with the DocTimeStamp appended.