-
Notifications
You must be signed in to change notification settings - Fork 0
/
encrypt.cpp
42 lines (35 loc) · 1.02 KB
/
encrypt.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
38
39
40
41
42
#include "encrypt.hpp"
// #include <openssl/evp.h>
// #include <openssl/aes.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
namespace encryption {
EncryptionAlgorithm::EncryptionAlgorithm(const std::string& key) {
encryptionKey = key;
}
std::string EncryptionAlgorithm::encrypt(const std::string& filename) {
cout << "Encryption is selected - "+filename+"\n";
// cout << encryptionKey;
// extract file name
// encrypt file name
// rename the file
// extract file contents
// encrypt the contents
// save the file
return filename;
}
std::string EncryptionAlgorithm::decrypt(const std::string& filename) {
cout << "Decryption is selected - "+filename+"\n";
// extract file name
// decrypt file name
// rename the file
// extract file contents
// decrypt the contents
// save the file
return filename;
}
}