Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Any solutions for this program: In this program, you will create a program to do encoding and decoding of messages using the Vignere cipher.

C++

Any solutions for this program:

In this program, you will create a program to do encoding and decoding of messages using the Vignere cipher. A Vigenere cypher is very similar to the Caeser cipher discussed in class, except that instead of using a single numeric value to shift each letter (we used three in the example program,) you use a series of values where those values are determined by a key word, repeated as many times as necessary to cover each letter of the message. Each letter of the key word applies to one letter of the message, with the key word repeated as many times as necessary to cover the entire length of the message. An "A" in the keyword results in a shift of zero, a "B" shifts a letter by 1, and so on up to "Z" that shifts a letter 25 positions. For example, if the key word was "ABC" then the first letter of your message would be unchanged, the second letter would be shifted by 1, the third letter by 2, the fourth letter would be unchanged, the fifth letter would be shifted by 1, and so on.

See the wikipedia entry at: http://en.wikipedia.org/wiki/Vigenre_cipher for an example of encoding the message "ATTACKATDAWN" with the keyword "LEMON"

As in the caesar.cpp program the message to be encoded must only consist of uppercase letters. The keyword will also be only uppercase. Whitespace should not alter the encryption, so if you were encoding three words, the output should be the same regardless of the words being entered on one line or three, for example. Do not test your program by cut/paste text into the input of your running program!

Your program should have one class named Vigenere, with a similar structure to the Caesar class from the program example.

I'll post some sample messages in the class discussion area.

Your program should require exactly two command line arguments. The first will either be the code "-e" or "-d" to indicate encoding or decoding of a message (this determines adding or subtracting you shift values.) and the second parameter will be a single word that will be the keyword that you use for the encryption or decryption. Your programs only output will be the encoded/decoded text.

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

Step: 3

blur-text-image

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago