be.ehealth.technicalconnector.service.timestamp

## Class TimestampUtil

- java.lang.Object
- - be.ehealth.technicalconnector.service.timestamp.TimestampUtil

-     public final class TimestampUtil
      extends Object

  Helperclass for timestamping.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimestampUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.bouncycastle.tsp.TimeStampToken` | `getTimestamp(byte[] tsTokenResponse)` Returns a `TimeStampToken` from either an unwrapped CMS token or a wrapped RFC 3161 response, trying the unwrapped form first.
    `static org.bouncycastle.tsp.TimeStampResponse` | `getTimestampResponse(byte[] tsTokenResponse)` Parses a (possibly base64-encoded) RFC 3161 TimeStampResponse.
    `static org.bouncycastle.tsp.TimeStampToken` | `getTimeStampToken(byte[] tsToken)` Parses a (possibly base64-encoded) raw CMS `TimeStampToken`.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TimestampUtil

          public TimestampUtil()

  - ### Method Detail

    - #### getTimestampResponse

          public static org.bouncycastle.tsp.TimeStampResponse getTimestampResponse(byte[] tsTokenResponse)
                                                                             throws TechnicalConnectorException

      Parses a (possibly base64-encoded) RFC 3161 TimeStampResponse.
      Parameters:
        `tsTokenResponse` - raw or base64-encoded TSP response bytes
      Returns:
        the parsed `TimeStampResponse`
      Throws:
        `TechnicalConnectorException` - if the bytes cannot be parsed or contain no token

    - #### getTimestamp

          public static org.bouncycastle.tsp.TimeStampToken getTimestamp(byte[] tsTokenResponse)
                                                                  throws TechnicalConnectorException

      Returns a `TimeStampToken` from either an unwrapped CMS token or a wrapped RFC 3161 response, trying the unwrapped form first.
      Parameters:
        `tsTokenResponse` - raw or base64-encoded bytes
      Returns:
        the parsed token
      Throws:
        `TechnicalConnectorException` - if neither form can be parsed

    - #### getTimeStampToken

          public static org.bouncycastle.tsp.TimeStampToken getTimeStampToken(byte[] tsToken)
                                                                       throws TechnicalConnectorException

      Parses a (possibly base64-encoded) raw CMS `TimeStampToken`.
      Parameters:
        `tsToken` - raw or base64-encoded CMS token bytes
      Returns:
        the parsed `TimeStampToken`
      Throws:
        `TechnicalConnectorException` - if the bytes cannot be parsed

Connector Packaging TRUSSMAKER 4.9.5 API
Copyright © {inceptionYear}-2026 eHealth. All Rights Reserved.