OpenCard  
 
OCF, the OpenCard Framework is a standard Java framework for working with Smart Cards.  
 

opencard.tests.service
Class SignData

java.lang.Object
  |
  +--opencard.tests.testframe.TestCase
        |
        +--opencard.tests.service.SignData

public class SignData
extends TestCase
implements java.lang.Runnable

The test generates a signature in the smartcard. If the program run without parameters then three threads are started. Each thread generates a signature. The tested card's layout is in the subdirectory testlay/lay-40a. The corresponding card's layout must be on the card to run the program with parameters: java SignData


Constructor Summary
SignData()
           
SignData(java.lang.String Data, int KeyNumber, java.lang.String DirID)
          initializes the parameters which are needed for the signature generation
 
Method Summary
static int getRetCode()
           
static void main(java.lang.String[] args)
          Starts the program, evaluates the parameters and instantiates the test.
 void run()
          calls the method sign and evaluates the return value.
static void setRetCode(int rc)
           
 byte[] sign(java.lang.String Data, int KeyNumber, java.lang.String DirID)
          Generate a Signature.
 int start(java.lang.String[] args)
           
 
Methods inherited from class opencard.tests.testframe.TestCase
getTestFrameReference, setTestFrameReference, showActionRequired, showError, showInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignData

public SignData(java.lang.String Data,
                int KeyNumber,
                java.lang.String DirID)
initializes the parameters which are needed for the signature generation
Parameters:
Data - Data to be signed
KeyNumber - KeyNumber of the key used for signing
DirID - ID of the Directory where the Keyfiles are located

SignData

public SignData()
Method Detail

main

public static void main(java.lang.String[] args)
Starts the program, evaluates the parameters and instantiates the test.

start

public int start(java.lang.String[] args)
Overrides:
start in class TestCase

run

public void run()
calls the method sign and evaluates the return value.
Specified by:
run in interface java.lang.Runnable

sign

public byte[] sign(java.lang.String Data,
                   int KeyNumber,
                   java.lang.String DirID)
Generate a Signature.

Parameters:
Data - Data to be signed
KeyNumber - KeyNumber of the key used for signing
DirID - ID of the Directory where the Keyfiles are located

setRetCode

public static void setRetCode(int rc)

getRetCode

public static int getRetCode()