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

opencard.tests.terminal
Class GenerateKey

java.lang.Object
  |
  +--opencard.core.service.CardService
        |
        +--opencard.tests.terminal.TestBean
              |
              +--opencard.tests.terminal.CommandBean
                    |
                    +--opencard.tests.terminal.GenerateKey

public class GenerateKey
extends CommandBean

GenerateKey is derived from the CommandBean which provide most of the required functionality.

SAMPLE:
GenerateKey generate = new GenerateKey();
generate.setCardType(CommandCodeFactory.BULL);
generate.initialize(card);
generate.setId("Bull PCSC-Test4");
generate.setData(new byte[]{(byte)0x12,(byte)0x00});
generate.addExpectedResult(0x9000);
generate.execute();

Version:
$Id: GenerateKey.java,v 1.1 1999/12/03 09:31:36 damke Exp $
See Also:
CommandBean, TestBean

Fields inherited from class opencard.tests.terminal.CommandBean
response
 
Fields inherited from class opencard.tests.terminal.TestBean
resultLookup
 
Constructor Summary
GenerateKey()
          Default constructor.
 
Method Summary
protected  void setCommandBytes()
          define the default values for the command parameters:
 void setData(byte[] data)
          Friendly Method to set the data to be used somehow (??)
 
Methods inherited from class opencard.tests.terminal.CommandBean
assemble, execute, getCardType, getCla, getCommandData, getIns, getLe, getMode, getP1, getP2, getResponseData, initialize, resetCardService, setCardService, setCardType, setCla, setCommandData, setIns, setLe, setMode, setP1, setP2, setParameters, toString
 
Methods inherited from class opencard.tests.terminal.TestBean
addExpectedResult, addExpectedResult, addUnexpectedResult, addUnexpectedResult, checkResult, clearResultLookup, getId, getLabel, getResult, getResultString, getTitle, isDetails, lookupResult, lookupResult, setDetails, setId, setLabel, setResult, setResult, setResult
 
Methods inherited from class opencard.core.service.CardService
allocateCardChannel, getCard, getCardChannel, getCHVDialog, initialize, releaseCardChannel, setCardChannel, setCHVDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenerateKey

public GenerateKey()
            throws TestInitException
Default constructor. Sets a Label for the friendly log-output Since the CommandBeans should be beans, please declare only the default constructor.
Method Detail

setCommandBytes

protected void setCommandBytes()
define the default values for the command parameters:
Overrides:
setCommandBytes in class CommandBean

setData

public void setData(byte[] data)
Friendly Method to set the data to be used somehow (??) for something ???. The given data is transformed into the apropriate parameters and CommandData of the APDU
Parameters:
data - - the data to be updated