-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
37 lines (35 loc) · 1.17 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "Class.hpp"
#include "Class2.hpp"
#include "Class3.hpp"
int main(int argc, const char * argv[]){
signed int choice= 3;
encrypter myFile;
decrypter myCypher;
std::string tempInput= " ";
std::string totalInput;
while(choice!= 0){
std::cout<< "Welcome to Be Cryptic, the command line encryption software!\n";
std::cout<< "What would you like to do?\n 1= encrypt\n 2= decrypt\n 0= Exit\n";
std::cin>> choice;
if(choice== 1){
std::cout<< "Please input text to be encrypted\n";
std::cout<< "enter an empty line to finish:\n";
std::cin.ignore();
//std::getline(std::cin, tempInput);
////////////////////////////////////
while(tempInput.length()!= 0){
tempInput= "";
getline(std::cin, tempInput);
totalInput= totalInput + ' ' + tempInput;
}
////////////////////////////////////
myFile.inputUsrData(totalInput);
myFile.keyGen();
myFile.txtGen();
}
if(choice== 2){
myCypher.decypher();
}
}
return 0;
}