PKI-Lite - v1.2.1
    Preparing search index...

    Builder class for creating RFC 3161 Time-Stamp Requests.

    Provides a fluent API for constructing TimeStampReq objects, including automatic hashing of input data.

    // Build from raw data (hash computed automatically)
    const tsReq = await TimeStampReq.builder()
    .setData(documentBytes)
    .setHashAlgorithm('SHA-256')
    .setCertReq(true)
    .setNonce(crypto.getRandomValues(new Uint8Array(8)))
    .build()

    // Send to TSA
    const response = await tsReq.request({ url: 'https://freetsa.org/tsr' })

    Implements

    Index

    Constructors

    Methods

    • Sets the data to be timestamped. The hash will be computed automatically during build() using the configured hash algorithm.

      Parameters

      • data: string | Uint8Array<ArrayBuffer>

        The data to timestamp (raw bytes or string)

      Returns this

      This builder for chaining