opencard.tests.terminal
Class AskRandom
java.lang.Object
|
+--opencard.core.service.CardService
|
+--opencard.tests.terminal.TestBean
|
+--opencard.tests.terminal.CommandBean
|
+--opencard.tests.terminal.AskRandom
- public class AskRandom
- extends CommandBean
AskRandom defines a simple Get Challenge-Command.
It is derived from the CommandBean which provide most of the required
functionality.
SAMPLE:
AskRandom challenge = new AskRandom();
challenge.setCardType(CommandCodeFactory.BULL);
challenge.initialize(card);
challenge.setId("Bull PCSC-Test1");
challenge.setSize(8);
challenge.addExpectedResult(0x9000);
challenge.execute();
- Version:
- $Id: AskRandom.java,v 1.1 1999/12/03 09:31:35 damke Exp $
- See Also:
CommandBean,
TestBean
|
Constructor Summary |
AskRandom()
Default constructor.
|
|
Method Summary |
protected void |
setCommandBytes()
define the default values for the command parameters: |
void |
setSize(int size)
Friendly Method to set the Size of the random number to be generate.
|
| 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 java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
AskRandom
public AskRandom()
throws TestInitException
- Default constructor.
Sets a Label for the friendly log-output
Since the CommandBeans should be beans, please declare only the default
constructor.
setCommandBytes
protected void setCommandBytes()
- define the default values for the command parameters:
- Overrides:
- setCommandBytes in class CommandBean
setSize
public void setSize(int size)
- Friendly Method to set the Size of the random number to be generate.
The given length is transformed into the apropriate parameters and
and CommandData of the APDU
- Parameters:
size - - the size of the random number in no. of bytes
|