📄 krcrypto.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 + -