forked from Jacobshin04/Crypto
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCipher.cpp
More file actions
93 lines (74 loc) · 1.66 KB
/
Cipher.cpp
File metadata and controls
93 lines (74 loc) · 1.66 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#include <iostream>
#include "Cipher.hpp"
#include "Caesar.hpp"
#include "Linear.hpp"
using namespace std;
void Cipher::Start()
{
// intializing user's choice
int menu = -1;
//list of Ciphers
enum Cipher {CAESAR, LINEAR, VIGENERE, AUTOKEY, HILL, VERMAN, RSA, EXIT};
//prompting the user to pick the Cipher
system("clear");
cout << "Choose the menu" << endl << endl;
cout << "0. Caeser Cipher" << endl << endl;
cout << "1. Linear Cipher" << endl << endl;
cout << "2. Vigenere Cipher" << endl << endl;
cout << "3. AutoKey Cipher" << endl << endl;
cout << "4. Hill Cipher" << endl << endl;
cout << "5. Verman Cipher" << endl << endl;
cout << "6. RSA Crypto System" << endl << endl;
cout << "7. exit" << endl;
//boolean to determine repeating the switch statement
bool repeat = false;
do
{
//get number from the user
cout << "Enter a Number: ";
cin >> menu;
switch(menu)
{
//num 0
case CAESAR:{
//initializing the Caesar Class object
Caesar caesar1;
}
break;
//num 1
case LINEAR:{
//initializing the Linear Class object
Linear linear1;
}
break;
/*
case VIGENERE:
Vigenere();
break;
case AUTOKEY:
AutoKey();
break;
case HILL:
Hill();
break;
case VERMAN:
Verman();
break;
case RSA:
Rsa();
break;
*/
//num 7 -> program terminates
case EXIT:
exit(EXIT_SUCCESS);
break;
//prompting the user to enter the number again
default:
cout << "Enter a number again: ";
repeat = true;
break;
}
} while(repeat == true); //iterates until user inputs a appropriate number
//go back to the starting menu again
Start();
} //end of "Start"