public class DESExample
extends java.lang.Object
The program is command line driven, with the input and output files specified on the command line.
java org.bouncycastle.crypto.examples.DESExample infile outfile [keyfile]A new key is generated for each encryption, if key is not specified, then the example will assume encryption is required, and as output create deskey.dat in the current directory. This key is a hex encoded byte-stream that is used for the decryption. The output file is Hex encoded, 60 characters wide text file.
When encrypting;
When decrypting;
This example shows how to use the light-weight API, DES and the filesystem for message encryption and decryption.
Constructor and Description |
---|
DESExample() |
DESExample(java.lang.String infile,
java.lang.String outfile,
java.lang.String keyfile,
boolean encrypt) |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |