Skip to content

Latest commit

 

History

History

DesEncryptionExample

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
The MyEncrypt and MyDecrypt Java programs work together to encrypt and decrypt files. DES encryption is used, with DES/ECB/PKCS5Padding options.

MyEncrypt accepts a file and a password. It encrypts the data and stores it in a binary file called encrypt.bin.

MyDecrypt accepts a file generated by MyEncrypt, along with the password used by MyEncrypt. It decrypts the data and writes it to a binary file called decrypt.bin.

Here is a sample run of the two programs:

C:\Temp> java MyEncrypt oranges.jpg mypa$$99
file written: encrypt.bin

C:\Temp> java MyDecrypt encrypt.bin mypa$$99
file written: decrypt.bin

C:\Temp> rename decrypt.bin oranges2.jpg

C:\Temp>