-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
59 lines (44 loc) · 1.4 KB
/
main.cpp
File metadata and controls
59 lines (44 loc) · 1.4 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
#include <iostream>
#include <vector>
#include "Caesar.cpp"
#include "Playfair.cpp"
#include "Hill.cpp"
#include "ColumnarTransposition.cpp"
#include "DES.cpp"
#include "AES.cpp"
#include <string>
int main() {
std::string plain;
std::cout << "Enter a string: ";
std::getline(std::cin, plain);
// AES
/*std::string key = "Thats my Kung Fu";
AES aes(key);
std::string cipher = aes.encrypt(plain);
std::string decrypted = aes.decrypt(cipher);*/
std::string key = "Thats my Kung Fu";
DES des(key);
std::string cipher = des.encrypt(plain);
std::string decrypted = des.decrypt(cipher);
/*std::string key;
std::cout << "Enter a key: ";
std::cin >> key;*/
/*ColumnarTransposition columnarTransposition(key);
std::string cipher = columnarTransposition.encrypt(plain);
std::string decrypted = columnarTransposition.decrypt(cipher);*/
/*Hill hill;
std::string cipher = hill.encrypt(plain);
std::string decrypted = hill.decrypt(cipher);*/
/*Playfair playfair(key);
std::string cipher = playfair.encrypt(plain);
std::string decrypted = playfair.decrypt(cipher);*/
/*int shift;
std::cout << "Enter a shift (value should be between 1 to 25): ";
std::cin >> shift;
Caesar caesar(shift);
std::string cipher = caesar.encrypt(plain);
std::string decrypted = caesar.decrypt(cipher);*/
std::cout << "Encrypted: " << cipher << std::endl;
std::cout << "Decrypted: " << decrypted << std::endl;
return 0;
}