10 template <
unsigned int BITS>
13 uint8_t m_data_rev[WIDTH];
14 for (
int i = 0; i < WIDTH; ++i) {
15 m_data_rev[i] = m_data[WIDTH - 1 - i];
20 template <
unsigned int BITS>
23 std::fill(m_data.begin(), m_data.end(), 0);
30 if (psz[0] ==
'0' &&
ToLower(psz[1]) ==
'x')
35 while (::
HexDigit(psz[digits]) != -1)
37 unsigned char* p1 = m_data.data();
38 unsigned char* pend = p1 + WIDTH;
39 while (digits > 0 && p1 < pend) {
42 *p1 |= ((
unsigned char)::
HexDigit(psz[--digits]) << 4);
48 template <
unsigned int BITS>
54 template <
unsigned int BITS>
void SetHex(const char *psz)
std::string ToString() const
std::string GetHex() const
static const uint256 ZERO
constexpr bool IsSpace(char c) noexcept
Tests if the given character is a whitespace character.
std::string HexStr(const Span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
signed char HexDigit(char c)
std::string ToLower(std::string_view str)
Returns the lowercase equivalent of the given string.