SignDoc SDK (.NET without exceptions)  5.0.0
TimeStamper Class Reference

Interface for creating an RFC 3161 timestamp. More...

Public Member Functions

string getHashAlgorithmOID ()
 Get the object ID of the message digest algorithm. More...
 
string getFallbackHashAlgorithmOID ()
 Get the object ID of the fallback message digest algorithm. More...
 
TimeStamperStampResult stamp (byte[] aHash, uint aRandomNonceSize, TimeStamperStampFlags aFlags, out byte[] aOutput, out int aStatus, out uint aFailureInfo)
 Create a time-stamp request, send the request to the configured time stamping authority, and evaluate the response. More...
 
void stop ()
 Interrupt a stamp() call from another thread. More...
 
string getErrorMessage ()
 Get an error message for the last stamp() call. More...
 

Detailed Description

Interface for creating an RFC 3161 timestamp.

Member Function Documentation

string getErrorMessage ( )

Get an error message for the last stamp() call.

Returns
A string describing the reason for the failure of the last stamp() call. The string is empty if the last call succeeded. The error message is in English.
string getFallbackHashAlgorithmOID ( )

Get the object ID of the fallback message digest algorithm.

Returns
Tthe object ID of the fallback message digest algorithm as string, e.g., "1.3.14.3.2.26" for SHA-1.
string getHashAlgorithmOID ( )

Get the object ID of the message digest algorithm.

Returns
The object ID of the message digest algorithm as string, e.g., "1.3.14.3.2.26" for SHA-1.
TimeStamperStampResult stamp ( byte[]  aHash,
uint  aRandomNonceSize,
TimeStamperStampFlags  aFlags,
out byte[]  aOutput,
out int  aStatus,
out uint  aFailureInfo 
)

Create a time-stamp request, send the request to the configured time stamping authority, and evaluate the response.

The signature in the returned time-stamp token is not verified by this function.

Parameters
[in]aHashThe document message digest to be hashed (unless TimeStamperStampFlags.DontHash is set in aFlags) and signed.
[in]aRandomNonceSizeThe size (in octets, 1 through 256) of the random nonce in the time-stamp request.
[in]aFlagsFlags modifying the behavior of this function, see enum TimeStamperStampFlags.
[out]aOutputThe time-stamp token sent by the server will be stored here as blob if this function returns TimeStamperStampResult.OK. Otherwise, aOutput will be empty.
[out]aStatusThe PKIStatus value of the response from the server will be stored here. 0 if no response from the server is available.
[out]aFailureInfoThe PKIFailureInfo value of the response from the server will be stored here. 0 if no response from the server is available.
Returns
TimeStamperStampResult.OK if successful. Use getErrorMessage() to get an error message.
See also
getErrorMessage(), getHashAlgorithmOID(), stop()
void stop ( )

Interrupt a stamp() call from another thread.

If this function is called while stamp() is waiting for the response from the server, stamp() will return TimeStamperStampResult.Stopped.


The documentation for this class was generated from the following file: