[#base_blob-09] = base_blob :mrdocs: Template base class for fixed‐sized opaque blobs. == Synopsis Declared in `<uint256.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<unsigned int BITS> class base_blob; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:base_blob-09/2constructor-00.adoc[`base_blob`] [.small]#[constructor]# | Constructors | xref:base_blob-09/GetHex.adoc[`GetHex`] | The hex representation used by GetHex(), ToString(), and FromHex() is unusual, since it shows bytes of the base_blob in reverse order. For example, a 4‐byte blob {0x12, 0x34, 0x56, 0x78} is represented as "78563412" instead of the more typical "12345678" representation that would be shown in a hex editor or used by typical byte‐array / hex conversion functions like python's bytes.hex() and bytes.fromhex(). | xref:base_blob-09/GetUint64.adoc[`GetUint64`] | Reads a 64‐bit little‐endian word from the blob at a byte offset. | xref:base_blob-09/IsNull.adoc[`IsNull`] | Returns true if every byte of the blob is zero. | xref:base_blob-09/Serialize.adoc[`Serialize`] | Serializes the blob's raw bytes to a stream. | xref:base_blob-09/SetNull.adoc[`SetNull`] | Sets every byte of the blob to zero. | xref:base_blob-09/ToString.adoc[`ToString`] | Returns the blob as a hex string in reverse byte order. | xref:base_blob-09/Unserialize.adoc[`Unserialize`] | Deserializes the blob's raw bytes from a stream. | xref:base_blob-09/begin-04.adoc[`begin`] | Returns a pointer to the first byte of the blob. | xref:base_blob-09/data-0a.adoc[`data`] | Returns a pointer to the blob's raw bytes. | xref:base_blob-09/end-0c.adoc[`end`] | Returns a pointer just past the last byte of the blob. | xref:base_blob-09/operator_eq.adoc[`operator==`] | Compares two blobs for byte‐wise equality. | xref:base_blob-09/operator_3way.adoc[`operator<=>`] | Lexicographic ordering |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:base_blob-09/size.adoc[`size`] | Returns the size of the blob in bytes. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:base_blob-09/m_data.adoc[`m_data`] | Fixed‐size byte storage holding the blob's raw bytes. |=== == Protected Static Data Members [cols="1,4"] |=== | Name| Description | xref:base_blob-09/WIDTH.adoc[`WIDTH`] | Number of bytes in the blob (BITS / 8). |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:ChainCode.adoc[`ChainCode`] | A BIP32 chain code. Cleansed on destruction. | xref:uint160.adoc[`uint160`] | 160‐bit opaque blob. | xref:uint256.adoc[`uint256`] | 256‐bit opaque blob. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#