[#uint160] = uint160 :mrdocs: 160‐bit opaque blob. == Synopsis Declared in `<uint256.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class uint160 : public xref:base_blob-09.adoc[base_blob<160>] ---- == Description [NOTE] ==== This type is called uint160 for historical reasons only. It is an opaque blob of 160 bits and has no integer operations. ==== == Base Classes [cols="1,4"] |=== | Name| Description | `xref:base_blob-09.adoc[base_blob<160>]` | Template base class for fixed‐sized opaque blobs. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:uint160/2constructor-08.adoc[`uint160`] [.small]#[constructor]# | Constructors | xref:uint160/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:uint160/GetUint64.adoc[`GetUint64`] | Reads a 64‐bit little‐endian word from the blob at a byte offset. | xref:uint160/IsNull.adoc[`IsNull`] | Returns true if every byte of the blob is zero. | xref:uint160/Serialize.adoc[`Serialize`] | Serializes the blob's raw bytes to a stream. | xref:uint160/SetNull.adoc[`SetNull`] | Sets every byte of the blob to zero. | xref:uint160/ToString.adoc[`ToString`] | Returns the blob as a hex string in reverse byte order. | xref:uint160/Unserialize.adoc[`Unserialize`] | Deserializes the blob's raw bytes from a stream. | xref:uint160/begin-0a.adoc[`begin`] | Returns a pointer to the first byte of the blob. | xref:uint160/data-0e.adoc[`data`] | Returns a pointer to the blob's raw bytes. | xref:uint160/end-0c.adoc[`end`] | Returns a pointer just past the last byte of the blob. | xref:uint160/operator_eq.adoc[`operator==`] | Compares two blobs for byte‐wise equality. | xref:uint160/operator_3way.adoc[`operator<=>`] | Lexicographic ordering |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:uint160/FromHex.adoc[`FromHex`] | Parses a uint160 from a hex string. | xref:uint160/size.adoc[`size`] | Returns the size of the blob in bytes. |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:uint160/m_data.adoc[`m_data`] | Fixed‐size byte storage holding the blob's raw bytes. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:Hash160.adoc[`Hash160`] | Compute the 160‐bit hash an object. | xref:RIPEMD160.adoc[`RIPEMD160`] | Compute the 160‐bit RIPEMD‐160 hash of an array. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:CKeyID.adoc[`CKeyID`] | A reference to a CKey: the Hash160 of its serialized public key |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#