Running CipherStreamExample
The CipherStreamExample sample application uses CipherOutputStream and a CipherInputStream in conjunction with a cipher to:
Write encrypted data to a stream.
Read the encrypted 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.CipherStreamExample <in_file> <out_file>|
Parameter |
Value |
|
<in_file> |
The path of an input file containing plain text data. |
|
<out_file> |
The path of the output file containing the ciphered data. |
For example:
C:\etjava\examples>java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.crypto.CipherStreamExample data\testfiles\test.txt data\testfiles\test.encInstalling providers... DONEGenerating key... DONEEncrypting the plaintext file... DONEDecrypting the ciphertext file... DONE