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

📄 krcrypto.h

📁 windowxp 下各种系统提供的加密方法:rsa,des,sha,md5
💻 H
字号:
#pragma once

#include <string>

class CKrCrypto
{
public:
	CKrCrypto(void);
	~CKrCrypto(void);
	static bool Base64Encode(std::string& strTxt);
	static bool Base64Decode(std::string& strTxt);
	static bool GenRsaKeyPair(std::string& strPub, std::string& strPrv, const int& nKeySize = 1024);
	static bool RandomEnCrypt(std::string& strText, const std::string& strPubKey, std::string& strRandKey);
	static bool RandomDeCrypt(std::string& strText, const std::string& strPrvKey, const std::string& strRandKey);
	static bool Md5Hash(const std::string& strText, std::string& strMd5);
	static bool Sha1Hash(const std::string& strText, std::string& strSha1);
	static void Hex16Encode(std::string& strText);
	static bool Hex16Decode(std::string& strText);
	static bool SimpleEnCrypt(std::string& strText, const std::string& strKey);
	static bool RsaEnCrypt(std::string& strText, const std::string& strKey);
	static bool RsaDecrypt(std::string& strText, const std::string& strKey);
};

⌨️ 快捷键说明

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