Adds a request extension.
The extension to add
This builder for chaining
Builds the timestamp request, computing the message imprint hash if data was provided via setData().
Promise resolving to the TimeStampReq
Sets whether to request the TSA certificate in the response.
Whether to request the TSA certificate
This builder for chaining
Sets the data to be timestamped. The hash will be computed automatically during build() using the configured hash algorithm.
The data to timestamp (raw bytes or string)
This builder for chaining
Sets the hash algorithm used to compute the message imprint. Only used when setData() is provided. Defaults to 'SHA-256'.
The hash algorithm
This builder for chaining
Sets a pre-computed message imprint, bypassing automatic hashing.
The message imprint
This builder for chaining
Sets the nonce for replay protection.
The nonce bytes (typically 8-16 random bytes)
This builder for chaining
Generates and sets a random nonce for replay protection.
The length of the random nonce (default 8)
This builder for chaining
Sets the requested TSA policy OID.
The TSA policy identifier
This builder for chaining
Sets the protocol version. Defaults to 1.
The protocol version
This builder for chaining
Builder class for creating RFC 3161 Time-Stamp Requests.
Provides a fluent API for constructing TimeStampReq objects, including automatic hashing of input data.
Example