6 #ifndef BITCOIN_UINT256_H 7 #define BITCOIN_UINT256_H 19 template<
unsigned int BITS>
23 static constexpr
int WIDTH = BITS / 8;
32 explicit base_blob(
const std::vector<unsigned char>& vch);
36 for (
int i = 0; i <
WIDTH; i++)
53 std::string
GetHex()
const;
54 void SetHex(
const char* psz);
55 void SetHex(
const std::string& str);
71 const unsigned char*
begin()
const 76 const unsigned char*
end()
const 81 static constexpr
unsigned int size()
91 template<
typename Stream>
97 template<
typename Stream>
149 #endif // BITCOIN_UINT256_H
const unsigned char * begin() const
static constexpr unsigned int size()
Span< std::byte > MakeWritableByteSpan(V &&v) noexcept
friend bool operator==(const base_blob &a, const base_blob &b)
void Serialize(Stream &s) const
constexpr uint256(uint8_t v)
const unsigned char * data() const
int Compare(const base_blob &other) const
friend bool operator!=(const base_blob &a, const base_blob &b)
const unsigned char * end() const
uint256(const std::vector< unsigned char > &vch)
void Unserialize(Stream &s)
uint256 uint256S(const char *str)
static const uint256 ZERO
friend bool operator<(const base_blob &a, const base_blob &b)
std::string ToString() const
static uint64_t ReadLE64(const unsigned char *ptr)
Template base class for fixed-sized opaque blobs.
static constexpr int WIDTH
Span< const std::byte > MakeByteSpan(V &&v) noexcept
std::string GetHex() const
uint160(const std::vector< unsigned char > &vch)
uint64_t GetUint64(int pos) const
void SetHex(const char *psz)
constexpr base_blob(uint8_t v)