net.aocat.psis.client.samples.timestamp.create
Class RFC3161TimestampCreationSample

java.lang.Object
  extended by net.aocat.psis.client.base.AbstractSample
      extended by net.aocat.psis.client.samples.timestamp.create.RFC3161TimestampCreationSample

public class RFC3161TimestampCreationSample
extends AbstractSample

Java code sample for RFC3161 timestamp creation.

Author:
aalcaide

Field Summary
private  java.lang.String OUT_DIR
           
private  boolean PRINT_REQUEST
           
private  boolean PRINT_RESPONSE
           
private  boolean SAVE_REQUEST_AND_RESPONSE
           
private  java.lang.String SIGN_REQUEST
           
private  java.lang.String SIGN_RESPONSE
           
 
Fields inherited from class net.aocat.psis.client.base.AbstractSample
factory, log
 
Constructor Summary
RFC3161TimestampCreationSample()
           
 
Method Summary
 void createTimestamp(java.io.File dataHash, java.io.File tsaCert)
          Creates an RFC3161 timestamp and saves it to disc.
static void main(java.lang.String[] args)
           
 
Methods inherited from class net.aocat.psis.client.base.AbstractSample
isResultWellFormed, isResultWellFormed, printSaveRequest, printSaveRequest, printSaveResponse, printSaveResponse, showResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRINT_REQUEST

private boolean PRINT_REQUEST

PRINT_RESPONSE

private boolean PRINT_RESPONSE

OUT_DIR

private java.lang.String OUT_DIR

SAVE_REQUEST_AND_RESPONSE

private boolean SAVE_REQUEST_AND_RESPONSE

SIGN_REQUEST

private java.lang.String SIGN_REQUEST

SIGN_RESPONSE

private java.lang.String SIGN_RESPONSE
Constructor Detail

RFC3161TimestampCreationSample

public RFC3161TimestampCreationSample()
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -
Throws:
java.io.IOException

createTimestamp

public void createTimestamp(java.io.File dataHash,
                            java.io.File tsaCert)
                     throws java.io.IOException
Creates an RFC3161 timestamp and saves it to disc. Prints and/or saves request and response.

Parameters:
dataHash - data hash to timestamp
tsaCert - TSA certificate
Throws:
java.io.IOException