12template <
unsigned int BITS>
 
   15    assert(vch.size() == 
sizeof(m_data));
 
   16    memcpy(m_data, vch.data(), 
sizeof(m_data));
 
   19template <
unsigned int BITS>
 
   22    uint8_t m_data_rev[WIDTH];
 
   23    for (
int i = 0; i < WIDTH; ++i) {
 
   24        m_data_rev[i] = m_data[WIDTH - 1 - i];
 
   29template <
unsigned int BITS>
 
   32    memset(m_data, 0, 
sizeof(m_data));
 
   39    if (psz[0] == 
'0' && 
ToLower(psz[1]) == 
'x')
 
   44    while (::
HexDigit(psz[digits]) != -1)
 
   46    unsigned char* p1 = (
unsigned char*)m_data;
 
   47    unsigned char* pend = p1 + WIDTH;
 
   48    while (digits > 0 && p1 < pend) {
 
   51            *p1 |= ((
unsigned char)::
HexDigit(psz[--digits]) << 4);
 
   57template <
unsigned int BITS>
 
   63template <
unsigned int BITS>
 
void SetHex(const char *psz)
std::string ToString() const
std::string GetHex() const
static const uint256 ZERO
std::string HexStr(const Span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
std::string ToLower(const std::string &str)
Returns the lowercase equivalent of the given string.
signed char HexDigit(char c)
constexpr bool IsSpace(char c) noexcept
Tests if the given character is a whitespace character.