Question: A cipher is an algorithm that will encrypt (and decrypt) data, most commonly text. Several types of cryptographic ciphers exist, but one of the simplest

A cipher is an algorithm that will encrypt (and decrypt) data, most commonly text. Several types of cryptographic ciphers exist, but one of the simplest and most famous is the rot13. In the rot13 cipher, each letter is replaced by the 13th letter starting the count from the count from the former. Hence each letter is replaced as follows:

A cipher is an algorithm that will encrypt (and decrypt) data, most

Your task will be to write a program that will both encrypt any text file containing spaces, uppercase letters, and lowercase letters (you should leave all punctuation including spaces unencrypted). You should map the input letters following the same logic explained earlier but replacing 13 by an integer n where: 0

The input will be a text document containing both upper-case andd lower-case letters, and the value for n. The output of your program should be the encrypted contents of the input file displayed on standard output.

For example, given n = 3 and the text Hello:

1. Rotate the alphabet by 3

2. Perform the encryption on each of the letters to obtain the new word Khoor.

Java: Place your code in a Java class called rotN (the source file will be rotN.java) and have it accept the value for n and the input file name from the command line. That is, your program should be executable from the command line by calling: ~>java rotN 3 inputFile.txt

which will output to the standard output.

Test Cases Design two test cases and hand them in. Make sure your test case files have the following names: cipher_input_001.txt, cipher_output_001.txt, and cipher_input_002.txt, cipher_output_002.txt.

This is a Program in JAVA. I'm not sure where to start or how we are to use the txt files for test cases. Please help. BELOW are some extra guidlines.

commonly text. Several types of cryptographic ciphers exist, but one of the

nopmNO M 123456789

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!