3 # Simple script to demonstrate usage of cryptTool.
5 # create a simple text file; dump its contents;
6 # encrypt the file using RC4;
7 # dump the binary contents of the resulting ciphertext;
9 # dump the resulting plaintext file;
11 set PLAINTEXT_FILE
=ptext
12 set CIPHERTEXT_FILE
=ctext
13 set RECOVERED_FILE
=rptext
15 echo Creating plaintext....
16 echo "This is a simple plaintext file for demonstration." > $PLAINTEXT_FILE
17 echo Contents of plaintext
:
19 echo Encrypting plaintext...
20 .
/cryptTool e foobar
16 $PLAINTEXT_FILE $CIPHERTEXT_FILE
21 echo Contents of ciphertext
:
22 /usr
/bin
/hexdump $CIPHERTEXT_FILE
24 .
/cryptTool d foobar
16 $CIPHERTEXT_FILE $RECOVERED_FILE
25 echo Contents of recovered text
: