Running CipherExamplePBE
The CipherExamplePBE sample application uses the Entrust implementation of the Password-based Encryption (PBE) cipher to encrypt and decrypt binary data .
To run this sample application, execute the following command line in the etjava/examples directory.
java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.crypto.CipherExamplePBE <key_pwd> [<iter_count>]|
Parameter |
Value |
|
<key_pwd> |
The password that will protect the key. |
|
<iter_count> |
The number of iterations to perform when generating the key. |
For example:
C:\etjava\examples>java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.crypto.CipherExamplePBE Passw0rd 100Installing providers... DONECreating key and parameters... DONEsalt: 55:E2:70:FD:CE:8B:B9:ADiterationCount: 100Encrypting data... DONEinput plaintext: 00:01:02:03:04:05:06:07:08:09output ciphertext: 02:6A:FA:C0:24:8E:C7:B4:CD:C5:7A:E0:37:24:7E:47Decrypting data... DONEinput ciphertext: 02:6A:FA:C0:24:8E:C7:B4:CD:C5:7A:E0:37:24:7E:47output plaintext: 00:01:02:03:04:05:06:07:08:09