⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 encryptor.h

📁 C++ web POSIX framewark
💻 H
字号:
#ifndef CPPCMS_ENCRYPTOR_H#define CPPCMS_ENCRYPTOR_H#include <vector>#include <string>namespace cppcms {class encryptor {	unsigned seed;protected:	unsigned rand(unsigned );	std::vector<unsigned char> key;	std::string base64_enc(std::vector<unsigned char> const &data);	void base64_dec(std::string const &,std::vector<unsigned char> &data);	struct info {		int64_t timeout;		uint16_t size;		char salt[6];	};	void salt(char *s);public:	virtual std::string encrypt(std::string const &plain,time_t timeout) = 0;	virtual bool decrypt(std::string const &cipher,std::string &plain,time_t *timeout=NULL) = 0;	encryptor(std::string key);	virtual ~encryptor();};}#endif

⌨️ 快捷键说明

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