Question
**Please it is necessary to use the functions and the names given. It is also important to use string and getline.** Implement two decryption functions
**Please it is necessary to use the functions and the names given. It is also important to use string and getline.**
Implement two decryption functions corresponding to the above ciphers. When decrypting ciphertext, ensure that the produced decrypted string is equal to the original plaintext:
decryptCaesar(ciphertext, rshift) == plaintext
decryptVigenere(ciphertext, keyword) == plaintext
Write a program decryption.cpp that uses the above functions to demonstrate encryption and decryption for both ciphers.
It should first ask the user to input plaintext, then ask for a right shift for the Caesar cipher and report the ciphertext and its subsequent decryption. After that, it should do the same for the Vigenere cipher.
Example:
$ ./decryption Enter plaintext: Hello, World! = Caesar = Enter shift : 10 Ciphertext : Rovvy, Gybvn! Decrypted : Hello, World! = Vigenere = Enter keyword : cake Ciphertext : Jevpq, Wyvnd! Decrypted : Hello, World!
(When reporting decrypted strings, they should be the result of applying decryption functions to the ciphertext, not the original plaintext variable.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started