Question
File encryption is the science of writing the contents of a file in a secret code. Your encryption program should work like a filter, reading
File encryption is the science of writing the contents of a file in a secret code. Your encryption program should work like a filter, reading the contents of one file modifying the data into a code, and then writing the coded contents out to a second file. There are very complex encryption techniques, but for ours, will use a simple one from the shift category. We will take each character and shift it one place in the Unicode sequence. So a becomes b, b becomes c, etc. What about z? You could make it a or just the next Unicode character, which is the choice we will take. NOTE: you must be writing and reading a text file, not a serializable one, and you must have a FileDialog ox where the user can choose the file to utilize.
Write a program names EncryptDecrypt.java that has the following menu choices:
Read in a file
Print the file to the console (obviously this is for debugging only)
Encrypt the file and write it to the console
Write out the encrypted file to a text file
Clear the data in memory
Read in an encrypted file
Decrypt the file
Write out the decrypted file to the console
End
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started