Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Substitution Cipher with files 1. Randomly generate an encryption and decryption key and store each in a separate file (1 file for encrypt key,

Java Substitution Cipher with files

1. Randomly generate an encryption and decryption key and store each in a separate file (1 file for encrypt key, 1 file for decrypt key) (Key is to be used for cipher, be sure key can map to any ASCII character) 2. Read in a file that contains the words "Hello Friend" (Input.txt) 3. Read in the file that contains encryption key (encryptKey.txt) 4. Perform a substitution cipher on Input.txt using encryptKey.txt and save the encrypted text to a file (Output.txt) 5. Read in file Output.txt containing encrypted text 6. Read in file containing decryption key and decrypt the text in Output.txt 7. Output decrypted text to a new file called DecryptedOutput.txt

At the end, Input.txt and DecrypteOutput.txt should have matching text!

I am having issue randomly generating the keys and saving them in a file. I am also having issues with the decryption part. When I read in the file containing "Hello Friend" (Input.txt) it gets encrypted but when I try to decrypt using a randomly generated key it doesn't return back the original text "Hello Friend"

Help please!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

What is the firms objective with regard to collection float?

Answered: 1 week ago