[]
        
(Showing Draft Content)

TimeStampProvider

Class: TimeStampProvider

Generates a timestamp token by sending a time-stamp request to a Time Stamping Authority (TSA) server.

Implements

Constructors

Constructor

new TimeStampProvider(serverUrl, externalResourcesOptions?): TimeStampProvider;

Creates a new TimeStampProvider.

Parameters

serverUrl

string

The uniform resource identifier for the Time Stamping Authority (TSA) server providing the time-stamp.

externalResourcesOptions?

ExternalResourcesOptions

Returns

TimeStampProvider

Accessors

externalResourcesOptions

Get Signature

get externalResourcesOptions(): ExternalResourcesOptions;

Gets configuration options used to retrieve external TSA response.

Returns

ExternalResourcesOptions

The current external resources configuration, or undefined if default behavior is used.

Set Signature

set externalResourcesOptions(value): void;

Sets configuration options used to retrieve external TSA response.

Parameters
value

ExternalResourcesOptions

The external resources configuration to apply, or undefined to use the default behavior.

Returns

void


hashAlgorithmOID

Get Signature

get hashAlgorithmOID(): string;

Gets the object identifier (OID) of hash algorithm used to encode the time-stamp request, default is SHA-256. Note! The list of supported algorithms defined by the TSA server used.

Returns

string

Set Signature

set hashAlgorithmOID(value): void;

Sets the object identifier (OID) of hash algorithm used to encode the time-stamp request, default is SHA-256. Note! The list of supported algorithms defined by the TSA server used.

Parameters
value

string

Returns

void


serverUrl

Get Signature

get serverUrl(): string;

Gets the uniform resource identifier for the Time Stamping Authority (TSA) server providing the time-stamp.

Returns

string

Set Signature

set serverUrl(value): void;

Sets the uniform resource identifier for the Time Stamping Authority (TSA) server providing the time-stamp.

Parameters
value

string

Returns

void

Methods

buildTimeStampToken()

buildTimeStampToken(dataHash, _): Promise<Uint8Array<ArrayBufferLike>>;

Generates a timestamp token (RFC 3161) for the provided data hash.

Parameters

dataHash

Uint8Array

The data hash to be timestamped.

_

TimeStampParams

Returns

Promise<Uint8Array<ArrayBufferLike>>

A promise that resolves to a DER-encoded timestamp token.

Implementation of

TimeStampProviderBase.buildTimeStampToken


getTimeStampParams()

getTimeStampParams(): Promise<TimeStampParams>;

Prepares parameters required for the first stage of the timestamping process.

This method performs validation, initializes timestamping-related data, and collects all inputs required for building the final timestamp container. It corresponds to the "preparation stage" of timestamping.

Returns

Promise<TimeStampParams>

A TimeStampParams object containing parameters required for timestamp generation

Throws

If the configured timestamp format is invalid or unsupported.

Implementation of

TimeStampProviderBase.getTimeStampParams