subject

In this assignment you'll write a program that encrypts the alphabetic letters in a file using the Hill cipher where the Hill matrix can be any size from 2 x 2 up to 9 x 9. Your program will take two command line parameters containing the names of the file storing the encryption key and the file to be encrypted. The program must generate output to the console (terminal) screen as specified belowCommand Line Parameters1. Your program must compile and run from the command line.2. The program executable must be named "hw1" (all lower case, no spaces or file extension).3. Input the required file names as command line parameters. Your program may NOT prompt the user to enter the file names. The first parameter must be the name of the encryption key file, as described below. The second parameter must be the name of the file to be encrypted, as also described below. The sample run command near the end of this document contains an example of how the parameters will be entered.4. Your program should open the two files, echo the input to the screen, make the necessary calculations, and then output the ciphertext to the console (terminal) screen in the format described below. Note: If the plaintext file to be encrypted doesn't have the proper number of alphabetic characters, pad the last block as necessary with the letter 'X'. (Yes, this is different from what is in our class slides, but it is necessary for us to do this so we can know what outputs to expect for our test inputs. Program Submission Instructions: • You must submit your source code file • The source code file must be submitted in Webcourses from the assignment page • All source code must be in exactly one file of type .c, .cpp, or .javaEncryption Key File FormatThe encryption key file will store a single positive integer, n (1 < n < 10), on the first line, indicating the number of rows and columns in the encryption matrix. The following n lines will contain the contents of each row, in order, of the encryption matrix, separated by spaces. Format of the File to be EncryptedThe file to be encrypted can be any valid text file with no more than 9991 letters in it. (Thus, it's safe to store all characters in the file in a character array of size 10000, including any padding characters.) Please note that the input text file will also generally have punctuation, numbers, special characters, and whitespace in it, which should be ignored. You should also ignore whether a letter is uppercase or lowercase in the input file. Thus, you should treat ‘A’ and ‘a’ the same in your program. Output FormatThe program must output the following to the console (terminal) screen:1. Echo the input key file2. Echo the input plaintext file3. Ciphertext output produced from running the cipher against the input plaintext file.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:00
Which software would you use to create a print design? a. illustrator b. audacity c. reaper d. dreamweaver
Answers: 2
question
Computers and Technology, 23.06.2019 05:20
Which operating system is a version of linux?
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
How would you cite different books by the same author on the works cited page? moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. –––. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. moore, jack h. folk songs and ballads. salem: poetry press, 1999. print. moore, jack h. ballads in poetry – a critical review. dallas: garden books, 1962. print. –––. folk songs and ballads. salem: poetry press, 1999. print.
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
When writing a business letter, how many times can you use the same merge field in a document? once once, unless using the address block feature unlimited it will depend on the type of document you choose
Answers: 1
You know the right answer?
In this assignment you'll write a program that encrypts the alphabetic letters in a file using the H...
Questions
question
Mathematics, 30.05.2020 19:02
question
History, 30.05.2020 19:02
question
Mathematics, 30.05.2020 19:02
Questions on the website: 13722360