em_aes.h

来自「c++的基于openssl实现的简单aes文件加密类」· C头文件 代码 · 共 43 行

H
43
字号
#ifndef EM_AES_H_#define EM_AES_H_#include <openssl/md5.h>#include <openssl/aes.h>#include <openssl/evp.h>#include <iostream>#include <string>#include <fstream>#include "config.h"using namespace std;struct EM_AESFILE{	string filename;	int    padsize;};class EM_AES{public:	EM_AES();	virtual ~EM_AES();	void set_key(const string &);	string get_key_str();		struct EM_AESFILE encrypt(const string & inputfile);	void decrypt(struct EM_AESFILE & em_aesfile);	private:	void _init_key(int);		AES_KEY m_aes_key;	static unsigned char m_key[];	static string m_key_str;	};#endif /*EM_AES_H_*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?