![]() |
Bitcoin Core
28.1.0
P2P Digital Currency
|
Template base class for fixed-sized opaque blobs. More...
#include <uint256.h>
Public Member Functions | |
| constexpr | base_blob () |
| constexpr | base_blob (uint8_t v) |
| constexpr | base_blob (Span< const unsigned char > vch) |
| consteval | base_blob (std::string_view hex_str) |
| constexpr bool | IsNull () const |
| constexpr void | SetNull () |
| constexpr int | Compare (const base_blob &other) const |
| Lexicographic ordering. More... | |
| constexpr const unsigned char * | data () const |
| constexpr unsigned char * | data () |
| constexpr unsigned char * | begin () |
| constexpr unsigned char * | end () |
| constexpr const unsigned char * | begin () const |
| constexpr const unsigned char * | end () const |
| constexpr uint64_t | GetUint64 (int pos) const |
| template<typename Stream > | |
| void | Serialize (Stream &s) const |
| template<typename Stream > | |
| void | Unserialize (Stream &s) |
Hex representation | |
The reverse-byte hex representation is a convenient way to view the blob as a number, because it is consistent with the way the base_uint class converts blobs to numbers.
| |
| std::string | GetHex () const |
| void | SetHexDeprecated (std::string_view str) |
| Unlike FromHex this accepts any invalid input, thus it is fragile and deprecated! More... | |
| std::string | ToString () const |
Static Public Member Functions | |
| static constexpr unsigned int | size () |
Protected Attributes | |
| std::array< uint8_t, WIDTH > | m_data |
Static Protected Attributes | |
| static constexpr int | WIDTH = BITS / 8 |
Friends | |
| constexpr bool | operator== (const base_blob &a, const base_blob &b) |
| constexpr bool | operator!= (const base_blob &a, const base_blob &b) |
| constexpr bool | operator< (const base_blob &a, const base_blob &b) |
Template base class for fixed-sized opaque blobs.
|
inline |
|
inline |
|
inline |
Lexicographic ordering.
Definition at line 62 of file uint256.h.
|
inline |
|
inline |
|
inline |
|
inline |
| std::string base_blob< BITS >::GetHex | ( | ) | const |
|
inline |
|
inline |
|
inline |
| void base_blob< BITS >::SetHexDeprecated | ( | std::string_view | str | ) |
Unlike FromHex this accepts any invalid input, thus it is fragile and deprecated!
Definition at line 21 of file uint256.cpp.
|
inline |
|
inlinestatic |
| std::string base_blob< BITS >::ToString | ( | ) | const |
|
inline |
|
staticprotected |
1.8.14