opencard.tests.service
Class EncipherData
java.lang.Object
|
+--opencard.tests.testframe.TestCase
|
+--opencard.tests.service.EncipherData
- public class EncipherData
- extends TestCase
- implements java.lang.Runnable
This test tries to encrypt data with a key .
If the program run without arguments then three threads are started. Each thread performs a encrypt operation.
If the program runs without arguments then the card has to include the card's layout in
the subdirectory testlayout/lay40-a. A corresponding layout on the card is required to run
the program with arguments:
java EncipherData
|
Constructor Summary |
EncipherData()
|
EncipherData(java.lang.String Data,
byte[] Key)
initializes the data to be encrypted and the key to be used. |
|
Method Summary |
byte[] |
encipher(java.lang.String Data,
byte[] Key)
Encipher Data. |
static int |
getRetCode()
|
static void |
main(java.lang.String[] args)
Starts the program, evaluates the parameters, initializes the key and instantiates the test. |
void |
run()
calls the method enchiper and evaluates the return value. |
static void |
setRetCode(int rc)
|
int |
start(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
EncipherData
public EncipherData(java.lang.String Data,
byte[] Key)
- initializes the data to be encrypted and the key to be used.
- Parameters:
Data - Data to be encipheredKey - Key to use
EncipherData
public EncipherData()
main
public static void main(java.lang.String[] args)
- Starts the program, evaluates the parameters, initializes the key and instantiates the test.
start
public int start(java.lang.String[] args)
- Overrides:
- start in class TestCase
run
public void run()
- calls the method enchiper and evaluates the return value.
- Specified by:
- run in interface java.lang.Runnable
encipher
public byte[] encipher(java.lang.String Data,
byte[] Key)
- Encipher Data.
- Parameters:
Data - Data to be encipheredKey - Key to use
setRetCode
public static void setRetCode(int rc)
getRetCode
public static int getRetCode()
|