[#base_blob-09]
= base&lowbar;blob
:mrdocs:

Template base class for fixed&hyphen;sized opaque blobs&period;

== Synopsis

Declared in `&lt;uint256&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;unsigned int BITS&gt;
class base&lowbar;blob;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:base_blob-09/2constructor-00.adoc[`base&lowbar;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&lowbar;blob in reverse order&period; For example, a 4&hyphen;byte blob &lcub;0x12, 0x34, 0x56, 0x78&rcub; is represented as &quot;78563412&quot; instead of the more typical &quot;12345678&quot; representation that would be shown in a hex editor or used by typical byte&hyphen;array &sol; hex conversion functions like python&apos;s bytes&period;hex() and bytes&period;fromhex()&period;
| xref:base_blob-09/GetUint64.adoc[`GetUint64`] 
| Reads a 64&hyphen;bit little&hyphen;endian word from the blob at a byte offset&period;
| xref:base_blob-09/IsNull.adoc[`IsNull`] 
| Returns true if every byte of the blob is zero&period;
| xref:base_blob-09/Serialize.adoc[`Serialize`] 
| Serializes the blob&apos;s raw bytes to a stream&period;
| xref:base_blob-09/SetNull.adoc[`SetNull`] 
| Sets every byte of the blob to zero&period;
| xref:base_blob-09/ToString.adoc[`ToString`] 
| Returns the blob as a hex string in reverse byte order&period;
| xref:base_blob-09/Unserialize.adoc[`Unserialize`] 
| Deserializes the blob&apos;s raw bytes from a stream&period;
| xref:base_blob-09/begin-04.adoc[`begin`] 
| Returns a pointer to the first byte of the blob&period;
| xref:base_blob-09/data-0a.adoc[`data`] 
| Returns a pointer to the blob&apos;s raw bytes&period;
| xref:base_blob-09/end-0c.adoc[`end`] 
| Returns a pointer just past the last byte of the blob&period;
| xref:base_blob-09/operator_eq.adoc[`operator&equals;&equals;`] 
| Compares two blobs for byte&hyphen;wise equality&period;
| xref:base_blob-09/operator_3way.adoc[`operator&lt;&equals;&gt;`] 
| 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&period;
|===


== Protected Data Members

[cols="1,4"]
|===
| Name| Description
| xref:base_blob-09/m_data.adoc[`m&lowbar;data`] 
| Fixed&hyphen;size byte storage holding the blob&apos;s raw bytes&period;
|===


== Protected Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:base_blob-09/WIDTH.adoc[`WIDTH`] 
| Number of bytes in the blob (BITS &sol; 8)&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:ChainCode.adoc[`ChainCode`] 
| A BIP32 chain code&period; Cleansed on destruction&period;
| xref:uint160.adoc[`uint160`] 
| 160&hyphen;bit opaque blob&period;
| xref:uint256.adoc[`uint256`] 
| 256&hyphen;bit opaque blob&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
