10template <
unsigned int BITS>
12 assert(vch.size() ==
sizeof(m_data));
13 memcpy(m_data, vch.data(),
sizeof(m_data));
18 for (
int i = 0; i < WIDTH; ++i) {
25 memset(m_data, 0,
sizeof(m_data));
54template <
unsigned int BITS>
void SetHex(const char *psz)
std::string ToString() const
std::string GetHex() const
static const uint256 ZERO
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
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.