mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-25 13:42:54 -05:00
Update BlockTemplate class.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "3rdparty/rapidjson/fwd.h"
|
||||
#include "base/tools/Buffer.h"
|
||||
#include "base/tools/Span.h"
|
||||
#include "base/tools/String.h"
|
||||
|
||||
|
||||
@@ -37,9 +38,11 @@ public:
|
||||
inline static bool fromHex(Buffer &buf, const String &hex) { return fromHex(buf, hex.data(), hex.size()); }
|
||||
inline static Buffer fromHex(const std::string &hex) { return fromHex(hex.data(), hex.size()); }
|
||||
inline static Buffer fromHex(const String &hex) { return fromHex(hex.data(), hex.size()); }
|
||||
inline static String toHex(const Buffer &data) { return toHex(data.data(), data.size()); }
|
||||
inline static String toHex(const std::string &data) { return toHex(reinterpret_cast<const uint8_t *>(data.data()), data.size()); }
|
||||
|
||||
template<typename T>
|
||||
inline static String toHex(const T &data) { return toHex(data.data(), data.size()); }
|
||||
|
||||
static bool fromHex(Buffer &buf, const char *in, size_t size);
|
||||
static bool fromHex(Buffer &buf, const rapidjson::Value &value);
|
||||
static bool fromHex(std::string &buf, const char *in, size_t size);
|
||||
@@ -49,6 +52,7 @@ public:
|
||||
static Buffer fromHex(const char *in, size_t size);
|
||||
static Buffer randomBytes(size_t size);
|
||||
static rapidjson::Value toHex(const Buffer &data, rapidjson::Document &doc);
|
||||
static rapidjson::Value toHex(const Span &data, rapidjson::Document &doc);
|
||||
static rapidjson::Value toHex(const std::string &data, rapidjson::Document &doc);
|
||||
static rapidjson::Value toHex(const uint8_t *in, size_t size, rapidjson::Document &doc);
|
||||
static String toHex(const uint8_t *in, size_t size);
|
||||
|
||||
Reference in New Issue
Block a user