# Rfc3161TimestampClient

RFC 3161 client with caller-owned HTTP transport, endpoint, credentials and trust policy.

Class 

`OfficeIMO.Security`

**Namespace**

`OfficeIMO.Security`

**Assembly**

`OfficeIMO.Security`

**Source revision**

`063fe3ee9839` with working tree changes

**Source**

[Rfc3161TimestampClient.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Security/Rfc3161TimestampClient.cs#L18)

**Modifiers**

sealed

RFC 3161 client with caller-owned HTTP transport, endpoint, credentials and trust policy.

## Inheritance

- object
- Rfc3161TimestampClient

Filter members 

Show inherited

## Constructors

`public Rfc3161TimestampClient(Func<byte[], CancellationToken, Task<byte[]>> transport, CertificateValidationOptions? certificateValidation = null, int maximumResponseBytes = 1048576)` [#](#constructor-ctor-func-system-byte-system-threading-cancellationtoken-system-threading-tasks-task-system-byte-officeimo-security-certificatevalidationoptions-int32)

[Rfc3161TimestampClient.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Security/Rfc3161TimestampClient.cs#L18)

Creates a client. The transport must POST the request as application/timestamp-query and return the application/timestamp-reply body, enforcing an HTTP response-size limit before buffering it. The client checks the response again and verifies nonce, imprint, signature, TSA profile and trust.

Parameters

**transport System.Func<byte[], System.Threading.CancellationToken, System.Threading.Tasks.Task<byte[]>> required**

**certificateValidation OfficeIMO.Security.CertificateValidationOptions? = null optional**

**maximumResponseBytes int = 1048576 optional**

## Methods

`public byte[] GetTimestamp(byte[] timestampedData)` [#](#method-gettimestamp-byte)

[Rfc3161TimestampClient.cs:61](https://github.com/EvotecIT/OfficeIMO/blob/063fe3ee9839db87940fc9ed8ae72f1f44b10982/OfficeIMO.Security/Rfc3161TimestampClient.cs#L61)

Synchronous adapter for CMS signing's timestamp callback.

Parameters

**timestampedData byte[] required**

Returns

`byte[]`

`public async Task<byte[]> GetTimestampAsync(byte[] timestampedData, CancellationToken cancellationToken = default)` [#](#method-gettimestampasync-byte-threading-cancellationtoken)

Requests a SHA-256 timestamp over the supplied bytes, returning a verified DER token.

Parameters

**timestampedData byte[] required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<byte[]>`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:69C37D7E783F409D23CCB2E6E3252A8CF12704A8A0D5A1FA2760009EF0A88B67 -->
