init
This commit is contained in:
commit
70d467d052
97 files changed
+10386
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
|
||||
#define CRYPTO_CHECK(condition, message) \
|
||||
if (!(condition)) { \
|
||||
throw std::runtime_error(message); \
|
||||
}
|
||||
namespace qing {
|
||||
class Crypto_Basic {
|
||||
public:
|
||||
class CryptoExp: public std::runtime_error {
|
||||
public:
|
||||
CryptoExp(const std::string& msg): std::runtime_error(msg) {}
|
||||
};
|
||||
protected:
|
||||
/* 字节码转十六进制字符串 */
|
||||
static std::string bytes_to_hex(const std::vector<unsigned char>& data);
|
||||
|
||||
/* 十六进制字符串转字节码 */
|
||||
static std::vector<unsigned char> hex_to_bytes(const std::string &hex);
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user