Question: Exam2 Bonus pdf O University of Houston (US) https:// uh.edu 1/courses/H. a search elearning. Page: In this assignment you will practice file VO in C++


Exam2 Bonus pdf O University of Houston (US) https:// uh.edu 1/courses/H. a search elearning. Page: In this assignment you will practice file VO in C++ and investigate the use of strings and manipulating strings. You will also leam a bit about encryption and decryption. Requirements: You are asked to write a program in C++ that implements the Vigenere cypher. Your program will input a text file that contains encrypted text. You will decrypt the file and output the results into another file. The input file, named "Encoded-txt", is provided for you. You are asked to output your results into another text file named "Decoded.txt". The Vigenere cypher uses acode word to scramble a plain-text document into and encrypted document. The cypher can be reversed to recover the original plain-text document from the encrypted document using same code word. Generally, only alphabet characters are encrypted, and so non-letters are removed. For our purposes, we will simply ignore punctuation and spaces, and only the letters are encrypted. Upper-case letters are encrypted to upper-case and lower-case to lower-case. To encrypt a text, each letter in the text is matched with a letter in the secret code. The letters in the secret code determine the offset applied to the encrypted letter. Each code letter produces an offset, for example "a" represents an offset of 0,"b" an offset of l, "c" an offset of 2 and so on. A letter in cypher-text, say "M" is encrypted by a code letter of "a" to "M", by "b" to "N", by c to "o" and so on. The encryption that offsets a letter past "z" wraps back around to start with "a In a similar way, the secret code can decrypt an encrypted text. Each letter in the encrypted text is matched with a letter in the secret code. The code letter determines the offset applied to the encrypted letter. The code letter "a" represents an offset of 0,"b" an offset of -1, "c" an offset of -2 and so on. A letter in cypher-text, say "K" is decrypted by a code letter of "a to "K", by "b"to "J", by cto "T" and so on. Decrypted letters wrap around with "z" coming before "a Code Letter RN RN D E. E
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
