Computers and Technology, 12.04.2021 21:00 mikelback419
Create a program that applies a simple "substitution cipher" to the contents of a text file and writes the encrypted text back to the file. A substitution cipher is given a key word and uses the unique characters from that word to generate a cipher alphabet. Suppose "feather" is used as the key. The following cipher alphabet will be generated: FEATHRZY X W V US OPON MLKJIGD CB A B C D E F G H I J K L M N O P Q R S T U V W X Y Z FEATHRZY X W V USO PONMLKJIGDCB
Using this cipher alphabet, read in a text file and replace each character with the corresponding cipher alphabet character (e. g., A -> F) when encoding and vice versa when decoding. In addition to being able to encode or decode, your application should utilize command line input parameters, with the following format: passing -e/-d to your program will cause the file to either encrypt or decrypt using the specified key. passing -k followed by a word will specify the key (e. g., -k feather) (you can use any word for the key you want). the last two strings will denote the input file and output file, respectively. Example: ./test -e -k feather input. txt output. txt
Assuming your compiled program was called "test", this line will read in input. txt, encrypt the text using the cipher alphabet generated by feather to the contents and write them to output. txt. Note: you will only apply the encryption alphabet to characters and leave spaces and punctuation alone. Hints: Use the file stream objects for reading and writing to your files. Use the getline() member function of the file streamer to get entire lines of strings from the input source. Don't forget to use the library for helpful functions for analyzing command line parameters. Also, when developing your cipher encryption, save dealing with capital letters for last. It's an easy conversion that can be applied during the encryption/decryption process.
Answers: 2
Computers and Technology, 22.06.2019 19:20
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 2
Computers and Technology, 23.06.2019 02:30
Experimental data that is expressed using numbers is said to be
Answers: 1
Computers and Technology, 24.06.2019 01:00
Verify each identity[tex] \frac{csc}{cot \: x \: + \: tan \: x} = cos \: x[/tex]
Answers: 1
Computers and Technology, 24.06.2019 16:30
Jenny needs to record the names of 30 students, write down the subjects they studied, and note their grades in each subject after the midsemester exams and the end-of-semester exams. she divides the midsemester and end-of-semester information into two separate worksheets, sheet 1 and sheet 2. how will she rename the two worksheets?
Answers: 2
Create a program that applies a simple "substitution cipher" to the contents of a text file and writ...
Mathematics, 17.11.2021 14:00
Mathematics, 17.11.2021 14:00
Mathematics, 17.11.2021 14:00
Computers and Technology, 17.11.2021 14:00
History, 17.11.2021 14:00
Law, 17.11.2021 14:00
Mathematics, 17.11.2021 14:00