easyVim  1.0
a simple vim-like text editor
encrypt.hpp
Go to the documentation of this file.
1 
8 #ifndef EASYVIM_ENCRYPT_HPP
9 #define EASYVIM_ENCRYPT_HPP
10 #include<string>
11 #include<vector>
12 
13 namespace ev {
14 
18  };
19 
23  };
24 
28  bool encrypt(std::vector<std::string> *input,
29  std::vector<std::string> *output,
30  std::string key, EV_ENCRYPT_TYPE evType=EV_ENCRYPT_AES_BEGIN);
31 
35  bool decrypt(std::vector<std::string> *input,
36  std::vector<std::string> *output,
37  std::string key, EV_DECRYPT_TYPE evType=EV_DECRYPT_AES_BEGIN);
38 
42  std::string md5(std::string input);
43 
47  void aes_encrypt(std::vector<std::string> *input, std::vector<std::string> *output, std::string key);
48  void aes_decrypt(std::vector<std::string> *input, std::vector<std::string> *output, std::string key);
49 
50 } // namespace ev
51 
52 #endif //EASYVIM_ENCRYPT_HPP
void aes_encrypt(std::vector< std::string > *input, std::vector< std::string > *output, std::string key)
Definition: aes.cpp:505
std::string md5(std::string input)
EV_DECRYPT_TYPE
Definition: encrypt.hpp:20
@ EV_DECRYPT_AES_NBEGIN
直接使用aes解密算法
Definition: encrypt.hpp:22
@ EV_DECRYPT_AES_BEGIN
使用aes解密算法,并且识别第一行的MD5,若识别失败则不解密
Definition: encrypt.hpp:21
EV_ENCRYPT_TYPE
Definition: encrypt.hpp:15
@ EV_ENCRYPT_AES_BEGIN
使用aes加密算法,并且在第一行增加密钥MD5进行识别
Definition: encrypt.hpp:16
@ EV_ENCRYPT_AES_NBEGIN
使用aes加密算法,但是不保存密钥MD5
Definition: encrypt.hpp:17