DigiStamp.com

dgs.tlkt.demo
Class DemoBouncyCastle

java.lang.Object
  extended bydgs.tlkt.demo.DemoBouncyCastle

public class DemoBouncyCastle
extends java.lang.Object

An example of using BouncyCastle software to verify a time stamp.

This code helps the DigiStamp user by providing code that was not supplied by DigiStamp to verify a time stamp. This was intended to improve the user's ability to verify authentication details.

The BouncyCastle team and their downloads are available at: the Legion Of The Bouncy Castle (http://www.bouncycastle.org). This example was tested with BouncyCastle Release 1.33. You will need Provider, SMIME/CMS, and TSP. The BouncyCastle TSP contains the extensions to support for RFC3161 time stamps. The steps are:

  1. Load you Internet communications preferences
  2. Create a time stamp request
  3. Retrieve the time stamp
  4. Verify the time stamp signature
  5. Verify the trust of time stamp certificate

Prerequisites:

  1. create your configuration file (account, password and failover rules).
  2. install the DigiStamp CA certificate for authenticating the retrieved time stamps.

See Also:
runDemo(String, String)

Constructor Summary
DemoBouncyCastle()
           
 
Method Summary
static byte[] calculateMessageDigest(java.io.InputStream datafile)
           
static DgsComm getTsaLocalProxy()
          The TSA local proxy is implemented with lazy initialization.
static void main(java.lang.String[] args)
          Execute the demo.Enter parameters input file name that will be time stamped output file name of the time stamp
 void runDemo(java.lang.String fileToTimestamp, java.lang.String outFileName)
          This is a demonstration of code that peforms the basic steps of a client user of the SecureTime toolkit.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DemoBouncyCastle

public DemoBouncyCastle()
Method Detail

calculateMessageDigest

public static byte[] calculateMessageDigest(java.io.InputStream datafile)
                                     throws java.security.NoSuchAlgorithmException,
                                            java.io.IOException
Throws:
java.security.NoSuchAlgorithmException
java.io.IOException

getTsaLocalProxy

public static DgsComm getTsaLocalProxy()
                                throws java.io.FileNotFoundException,
                                       java.io.IOException
The TSA local proxy is implemented with lazy initialization. Commonly this proxy would be used as a Singleton.

Returns:
Throws:
java.io.FileNotFoundException
java.io.IOException

main

public static void main(java.lang.String[] args)
Execute the demo.Enter parameters
  1. input file name that will be time stamped
  2. output file name of the time stamp

See Also:
runDemo(String, String)

runDemo

public void runDemo(java.lang.String fileToTimestamp,
                    java.lang.String outFileName)
This is a demonstration of code that peforms the basic steps of a client user of the SecureTime toolkit. The steps are:
  1. Create a time stamp request
  2. Retrieve the time stamp
  3. Verify the time stamp signature
  4. Verify the trust of time stamp signature certificate

Prerequisites:

  1. create your configuration file (account, password and failover rules).
  2. install the DigiStamp CA certificate for verify the retrieved time stamp.


Copyright 2000-2010 DigiStamp, Inc.