Can anyone help me write a decryption program that looks like this? I'm so lost since my teacher sucks and the book is very brief on the details
************************************************
Welcome to
The DECRYPTER
You have the option of performing either
a Caesar decryption
or
a Substitution decryption.
You will be asked for a file to be decoded.
The DECRYPTER will then echoprint one line
of your encoded text from your specified file
followed by the same text decoded.
************************************************
What would you like to do?
To decode a text file using the substitution cypher, press s
To decode a text file using the Caesar cypher, press c
To quit decoding, press q
What is your selection ? a
Sorry, that was not a valid input. Please try again.
What would you like to do?
To decode a text file using the substitution cypher, press s
To decode a text file using the Caesar cypher, press c
To quit decoding, press q
What is your selection ? 1
Sorry, that was not a valid input. Please try again.
What would you like to do?
To decode a text file using the substitution cypher, press s
To decode a text file using the Caesar cypher, press c
To quit decoding, press q
What is your selection ? c
File names must not contain blanks.
Please enter the file name to decode -> caesarSML.txt
************************************************
The DECRYPTER
of
Substitution Scheme Encryption
Using Caesar Substition set
************************************************
Original alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Shift Value: 6
Encrypted alphabet: GHIJKLMNOPQRSTUVWXYZABCDEF
ZNOY OY G YOSVRK ZKYZ ZU YKK
=> THIS IS A SIMPLE TEST TO SEE
OL ZNK VXUMXGS CUXQY. OL EUA
=> IF THE PROGRAM WORKS. IF YOU
IGT XKGJ ZNOY, ZNKT KBKXEZNOTM
=> CAN READ THIS, THEN EVERYTHING
OY UQ.
=> IS OK.
************************************************
What would you like to do?
To decode a text file using the substitution cypher, press s
To decode a text file using the Caesar cypher, press c
To quit decoding, press q
What is your selection ? s
File names must not contain blanks.
Please enter the file name to decode -> encodedstuff.jnk
Sorry, "encodedstuff.jnk" is not a valid file name. Please try again.
Please enter the name of the file to decode -> fred
Sorry, "fred" is not a valid file name. Please try again.
Please enter the name of the file to decode -> subSML.txt
************************************************
The DECRYPTER
of
Substitution Scheme Encryption
Using Substitution set
************************************************
Original alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Encrypted alphabet: MLKJIHGFEDCBAZYXWVUTSRQPON
TFEU EU M UEAXBI TIUT TY UII
=> THIS IS A SIMPLE TEST TO SEE
EH TFI XVYGVMA QYVCU. EH OYS
=> IF THE PROGRAM WORKS. IF YOU
KMZ VIMJ TFEU, TFIZ IRIVOTFEZG
=> CAN READ THIS, THEN EVERYTHING
EU YC.
=> IS OK.
************************************************
What would you like to do?
To decode a text file using the substitution cypher, press s
To decode a text file using the Caesar cypher, press c
To quit decoding, press q
What is your selection ? q
************************************************
Thank you for using
The DECRYPTER
************************************************
Press any key to continue . . .
There are 2 files i need to use "caesar.txt" and "sub.txt" Thank you
I don't have much, i know all the cout stuff and the basics, but i just need to know how to even use the decryptions, where to put them, and how to open the files and where to organize everything
#include <iostream>
#include <fstream>
using namespace std;
int main(void)
{
cout << "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-" << endl;
cout << “WELCOME TO THE DECRYPTER!” << endl;
cout << “Here you can choose to either perform<< endl;
cout << “a CAESAR decryption or” << endl;
cout << “a SUBSTITUTION decryption.”<< endl;
cout << “You will be asked for a file to be decoded.”<< endl;
cout << “The DECRYPTER will then echo print one line”<< endl;
cout << “of your encoded text from your specified file“<< endl;
cout << “foliowed by the same text decoded.”<< endl;
cout << "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"<< endl;
{
First things first, get the decryption working. Write some code into this driver program so that when you run it, you get the alphabet to print out in order:
This will prove to you that your decryption works for each character by taking the encrypted alphabets (subAlphaEncrypted and cesAlphaEncrypted) and turning them back into the regular alphabet using the appropriate decryption.