📄 aes_encryptor.h
字号:
#ifndef CPPCMS_AES_ENCRYPTOR_H#define CPPCMS_AES_ENCRYPTOR_H#include <string>#include <gcrypt.h>#include "encryptor.h"namespace cppcms {namespace aes {class cipher : public encryptor { gcry_cipher_hd_t hd_out; gcry_cipher_hd_t hd_in; struct aes_hdr { char salt[16]; char md5[16]; };public: virtual std::string encrypt(std::string const &plain,time_t timeout); virtual bool decrypt(std::string const &cipher,std::string &plain,time_t *timeout=NULL) ; cipher(std::string key); ~cipher();};} // aes} // cppcms#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -