Initializes a new instance of the TimeStampReq class
Initialization parameters
Optional
certIf the certReq field is present and set to true, the TSA's public key certificate that is referenced by the ESSCertID identifier inside a SigningCertificate attribute in the response MUST be provided by the TSA in the certificates field from the SignedData structure in that response. That field may also contain other certificates.
If the certReq field is missing or if the certReq field is present and set to false then the certificates field from the SignedData structure MUST not be present in the response.
Optional
extensionsThe extensions field is a generic way to add additional information to the request in the future.
Contains the hash of the datum to be time-stamped
Optional
nonceThe nonce, if included, allows the client to verify the timeliness of the response when no local clock is available. The nonce is a large random number with a high probability that the client generates it only once.
Optional
reqIndicates the TSA policy under which the TimeStampToken SHOULD be provided.
Version of the Time-Stamp request. Should be version 1.
Static
CLASS_Name of the class
Converts the class to JSON object
JSON object
Static
blockStatic
compareStatic
defaultReturns default values for all class members
Default value
String name for a class member
Static
fromBERCreates PKI object from the raw data
Initialized and filled current class object
ASN.1 encoded raw data
Static
schemaReturns value of pre-defined ASN.1 schema for current class
ASN.1 schema object
Input parameters for the schema
Generated using TypeDoc
Represents the TimeStampReq structure described in RFC3161
Example
The following example demonstrates how to create Time-Stamp Request
```js const nonce = pkijs.getRandomValues(new Uint8Array(10)).buffer;
const tspReq = new pkijs.TimeStampReq({ version: 1, messageImprint: await pkijs.MessageImprint.create("SHA-256", message), reqPolicy: "1.2.3.4.5.6", certReq: true, nonce: new asn1js.Integer({ valueHex: nonce }), });
const tspReqRaw = tspReq.toSchema().toBER();