<PackageReference Include="System.Security.Cryptography.Pkcs" Version="11.0.0-preview.1.26104.118" />

System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo

public sealed class Rfc3161TimestampTokenInfo
Represents the timestamp token information class defined in RFC3161 as TSTInfo.
public long? AccuracyInMicroseconds { get; }

Gets the accuracy with which Timestamp is compared.

public bool HasExtensions { get; }

Gets a value indicating whether there are any extensions associated with this timestamp token.

public Oid HashAlgorithmId { get; }

Gets an OID of the hash algorithm.

public bool IsOrdering { get; }

Gets a value indicating if every timestamp token from the same TSA can always be ordered based on the Timestamp, regardless of the accuracy. If the value is false, Timestamp indicates when the token has been created by the TSA.

public Oid PolicyId { get; }

Gets an OID representing the TSA's policy under which the response was produced.

public DateTimeOffset Timestamp { get; }

Gets the timestamp encoded in the token.

public int Version { get; }

Gets the version of the timestamp token.

public Rfc3161TimestampTokenInfo(Oid policyId, Oid hashAlgorithmId, ReadOnlyMemory<byte> messageHash, ReadOnlyMemory<byte> serialNumber, DateTimeOffset timestamp, long? accuracyInMicroseconds = default, bool isOrdering = false, ReadOnlyMemory<byte>? nonce = default, ReadOnlyMemory<byte>? timestampAuthorityName = default, X509ExtensionCollection extensions = null)

Initializes a new instance of the Rfc3161TimestampTokenInfo class with the specified parameters.

public static bool TryDecode(ReadOnlyMemory<byte> encodedBytes, out Rfc3161TimestampTokenInfo timestampTokenInfo, out int bytesConsumed)

Decodes an encoded TSTInfo value.

public byte[] Encode()

Encodes this object into a TSTInfo value.

Gets the extension values associated with the timestamp.

Gets the data representing the message hash.

public ReadOnlyMemory<byte>? GetNonce()

Gets the nonce associated with this timestamp token.

Gets an integer assigned by the TSA to the Rfc3161TimestampTokenInfo.

Gets the data representing the hint in the TSA name identification.

public bool TryEncode(Span<byte> destination, out int bytesWritten)

Attempts to encode this object as a TSTInfo value, writing the result into the provided buffer.