SecureTime API Toolkit
Toolkit Home  


The DgsTSHash function creates an encoded time stamp request that includes the supplied hash value. The time stamp request can then be sent via the Internet to DigiStamp to retrieve a time stamp.  Based on the request, the DigiStamp service signs the hash with the current time and returns a signed CMS structure.

  BYTE *hashAlgorithmID,              // in
  BYTE *hashAlgorithmParm,            // in
  BYTE *hashToBeTimeStamped           // in
  DWORD hashSize,                     // in
  LONG nonce                          // in
  BYTE **pbTSReqBlob,                 // out
  DWORD *pcbTSReqBlob                 // out


Identifier of the hash algorithm used to create the hash.  Defaults to ""(SHA1) if not specified.  Only SHA-1 is supported in current release.
Parameters used in hash function.  Current release supports only NULL.
Buffers that contain the contents to be signed.
Size of the hashToBeTimeStamped
Optional random number to be included in the time stamp.
The encoded time stamp request.  This is both DER and Base64 encoded.   If status is an error condition then pbTSReqBlob is not returned.  The caller of the function is responsible for deleting the memory allocated to hold this value
Pointer to a DWORD specifying the size, in bytes, of the pbTSReqBlob buffer. When the function returns, this variable contains the size, in bytes, of the signed and encoded message.  On output, the this parameter is updated to reflect the actual size of the data copied to the pbTSReqBlob.

Return Values

If the function succeeds, the return value is zero.  Return codes other that zero are describe below.  The numberical values are defined of the toolkit header files.

Error code Description
DGS_ERROR_MORE_DATA If the buffer specified by the pbTSReqBlob parameter is not large enough to hold the returned data, the function sets the ERROR_MORE_DATA code, and stores the required buffer size, in bytes, into the variable pointed to by pcbTSReqBlob.
DGS_NOT_SUPPORTED Unsupported Hash Algorithm
DGS_FORMAT Data submitted has wrong format (e.g. Hash length does not match Algorithm)

  18 April, 2000


  Feedback      Related Links   Contact Us   Mailing List    Privacy Statement
Copyright 2000-2005 DigiStamp, Inc.
All Rights Reserved
SecureTime, IPVault, IPProtector, and e-TimeStamp  are service marks of the DigiStamp, Inc.