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

    MessageImprint structure for RFC 3161 Time-Stamp Protocol.

    MessageImprint contains the hash of the data to be time-stamped along with the algorithm used to compute the hash. This ensures the integrity of the timestamped data by binding the timestamp to a specific hash value.

    MessageImprint ::= SEQUENCE {
      hashAlgorithm     AlgorithmIdentifier,
      hashedMessage     OCTET STRING
    }
    

    RFC 3161 Section 2.4.1 - TSAReq Structure

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    hashAlgorithm: AlgorithmIdentifier

    Algorithm used to hash the message

    hashedMessage: Uint8Array

    The hash value of the message to be timestamped

    Accessors

    • get pemHeader(): string

      Gets the PEM header name for this object type. Converts the class name to uppercase for use in PEM encoding.

      Returns string

    • get pkiType(): string

      Gets the PKI type name for this object (typically the class name). Used for PEM headers and debugging output.

      Returns string

    Methods

    • Compares this PKI object with another for equality. Two objects are considered equal if their DER encodings are identical.

      Parameters

      • other: PkiBase<any>

        The other PKI object to compare with

      Returns boolean

      true if the objects are equal, false otherwise

    • Returns a human-readable string representation of this object. By default, returns the same as toString(), but subclasses can override for more user-friendly output.

      Returns string

      A human-readable string representation

    • Creates a MessageImprint from an ASN.1 structure.

      Parses the ASN.1 SEQUENCE and extracts the hash algorithm and hashed message.

      Parameters

      Returns MessageImprint

      The parsed MessageImprint object

      Asn1ParseError if the ASN.1 structure is invalid

      const asn1 = derToAsn1(messageImprintBytes)
      const messageImprint = MessageImprint.fromAsn1(asn1)

      console.log(messageImprint.hashAlgorithm.algorithm) // Hash algorithm OID
      console.log(messageImprint.hashedMessage) // Hash bytes