|
Ring Daemon
|
Fixed-size raw-byte array container type, with an API optimised for storing hashes. More...
#include <FixedHash.h>


Public Types | |
| enum | { size = N } |
| The size of the container. More... | |
| enum | ConstructFromHashType { AlignLeft , AlignRight , FailIfDifferent } |
| Method to convert from a string. More... | |
| enum | ConstructFromPointerType { ConstructFromPointer } |
| A dummy flag to avoid accidental construction from pointer. More... | |
| enum | ConstructFromStringType { FromHex , FromBinary } |
| Method to convert from a string. More... | |
Public Member Functions | |
| std::string | abridged () const |
| std::string | abridgedMiddle () const |
| std::array< uint8_t, N > & | asArray () |
| std::array< uint8_t, N > const & | asArray () const |
| bytes | asBytes () const |
| auto | begin () const -> typename std::array< uint8_t, N >::const_iterator |
| template<unsigned P, unsigned M> | |
| FixedHash< M > | bloomPart () const |
| void | clear () |
| bool | contains (FixedHash const &_c) const |
| template<unsigned P, unsigned M> | |
| bool | containsBloom (FixedHash< M > const &_h) |
| uint8_t * | data () |
| uint8_t const * | data () const |
| auto | end () const -> typename std::array< uint8_t, N >::const_iterator |
| unsigned | firstBitSet () const |
| Returns the index of the first bit set to one, or size() * 8 if no bits are set. | |
| FixedHash () | |
| Construct an empty hash. | |
| FixedHash (bytes const &_b, ConstructFromHashType _t=FailIfDifferent) | |
| Explicitly construct, copying from a byte array. | |
| FixedHash (bytesConstRef _b, ConstructFromHashType _t=FailIfDifferent) | |
| Explicitly construct, copying from a byte array. | |
| template<unsigned M> | |
| FixedHash (FixedHash< M > const &_h, ConstructFromHashType _t=AlignLeft) | |
| Construct from another hash, filling with zeroes or cropping as necessary. | |
| FixedHash (std::string const &_s, ConstructFromStringType _t=FromHex, ConstructFromHashType _ht=FailIfDifferent) | |
| Explicitly construct, copying from a string. | |
| FixedHash (uint8_t const *_bs, ConstructFromPointerType) | |
| Explicitly construct, copying from a bytes in memory with given pointer. | |
| FixedHash (unsigned _u) | |
| Convert from unsigned. | |
| std::string | hex () const |
| operator bool () const | |
| bool | operator!= (FixedHash const &_c) const |
| FixedHash | operator& (FixedHash const &_c) const |
| FixedHash & | operator&= (FixedHash const &_c) |
| FixedHash & | operator++ () |
| bool | operator< (FixedHash const &_c) const |
| bool | operator<= (FixedHash const &_c) const |
| bool | operator== (FixedHash const &_c) const |
| bool | operator== (FixedHash< 32 > const &_other) const |
| Fast equality operator for h256. | |
| bool | operator> (FixedHash const &_c) const |
| bool | operator>= (FixedHash const &_c) const |
| uint8_t & | operator[] (unsigned _i) |
| uint8_t | operator[] (unsigned _i) const |
| FixedHash | operator^ (FixedHash const &_c) const |
| FixedHash & | operator^= (FixedHash const &_c) |
| FixedHash | operator| (FixedHash const &_c) const |
| FixedHash & | operator|= (FixedHash const &_c) |
| FixedHash | operator~ () const |
| template<class Engine > | |
| void | randomize (Engine &_eng) |
| Populate with random data. | |
| bytesRef | ref () |
| bytesConstRef | ref () const |
| template<unsigned P, unsigned M> | |
| FixedHash & | shiftBloom (FixedHash< M > const &_h) |
Static Public Member Functions | |
| static FixedHash | random () |
Fixed-size raw-byte array container type, with an API optimised for storing hashes.
Transparently converts to/from the corresponding arithmetic type; this will assume the data contained in the hash is big-endian.
Definition at line 52 of file FixedHash.h.
| anonymous enum |
| enum dev::FixedHash::ConstructFromHashType |
Method to convert from a string.
| Enumerator | |
|---|---|
| AlignLeft | |
| AlignRight | |
| FailIfDifferent | |
Definition at line 65 of file FixedHash.h.
| enum dev::FixedHash::ConstructFromPointerType |
A dummy flag to avoid accidental construction from pointer.
| Enumerator | |
|---|---|
| ConstructFromPointer | |
Definition at line 59 of file FixedHash.h.
| enum dev::FixedHash::ConstructFromStringType |
Method to convert from a string.
| Enumerator | |
|---|---|
| FromHex | |
| FromBinary | |
Definition at line 62 of file FixedHash.h.
|
inline |
Construct an empty hash.
Definition at line 68 of file FixedHash.h.
Referenced by dev::FixedHash< N >::operator&(), dev::FixedHash< N >::operator^(), and dev::FixedHash< N >::operator|().
|
inlineexplicit |
Construct from another hash, filling with zeroes or cropping as necessary.
Definition at line 72 of file FixedHash.h.
References dev::FixedHash< N >::AlignRight.
|
inlineexplicit |
Convert from unsigned.
Definition at line 81 of file FixedHash.h.
|
inlineexplicit |
Explicitly construct, copying from a byte array.
Definition at line 84 of file FixedHash.h.
References dev::FixedHash< N >::AlignRight, and dev::FixedHash< N >::FailIfDifferent.
|
inlineexplicit |
Explicitly construct, copying from a byte array.
Definition at line 99 of file FixedHash.h.
References dev::FixedHash< N >::AlignRight, dev::vector_ref< _T >::data(), dev::FixedHash< N >::FailIfDifferent, and dev::vector_ref< _T >::size().

|
inlineexplicit |
Explicitly construct, copying from a bytes in memory with given pointer.
Definition at line 114 of file FixedHash.h.
|
inlineexplicit |
Explicitly construct, copying from a string.
Definition at line 117 of file FixedHash.h.
|
inline |
Definition at line 192 of file FixedHash.h.
References dev::FixedHash< N >::ref(), and dev::toHex().

|
inline |
Definition at line 195 of file FixedHash.h.
References dev::FixedHash< N >::ref(), and dev::toHex().

|
inline |
Definition at line 225 of file FixedHash.h.
|
inline |
Definition at line 228 of file FixedHash.h.
|
inline |
Definition at line 222 of file FixedHash.h.
References dev::FixedHash< N >::data().

|
inline |
Definition at line 216 of file FixedHash.h.
|
inline |
Definition at line 260 of file FixedHash.h.
References dev::FixedHash< N >::data(), and P.

|
inline |
Definition at line 297 of file FixedHash.h.
|
inline |
Definition at line 184 of file FixedHash.h.
Referenced by dev::FixedHash< N >::containsBloom().
|
inline |
Definition at line 254 of file FixedHash.h.
References dev::FixedHash< N >::contains().

|
inline |
Definition at line 210 of file FixedHash.h.
Referenced by dev::FixedHash< N >::asBytes(), dev::FixedHash< N >::bloomPart(), dev::SecureFixedHash< T >::data(), dev::FixedHash< N >::operator==(), and dev::right160().
|
inline |
Definition at line 213 of file FixedHash.h.
|
inline |
Definition at line 219 of file FixedHash.h.
|
inline |
Returns the index of the first bit set to one, or size() * 8 if no bits are set.
Definition at line 282 of file FixedHash.h.
|
inline |
Definition at line 201 of file FixedHash.h.
References dev::FixedHash< N >::ref(), and dev::toHex().
Referenced by jami::ArchiveAccountManager::registerName().

|
inlineexplicit |
Definition at line 124 of file FixedHash.h.
|
inline |
Definition at line 131 of file FixedHash.h.
|
inline |
Definition at line 166 of file FixedHash.h.
References dev::FixedHash< N >::FixedHash().

|
inline |
Definition at line 160 of file FixedHash.h.
|
inline |
Definition at line 176 of file FixedHash.h.
References dev::FixedHash< N >::size.
|
inline |
Definition at line 132 of file FixedHash.h.
Referenced by dev::FixedHash< N >::operator<=(), and dev::FixedHash< N >::operator>=().
|
inline |
Definition at line 142 of file FixedHash.h.
References dev::FixedHash< N >::operator<(), and dev::FixedHash< N >::operator==().
Referenced by dev::FixedHash< N >::operator>().

|
inline |
Definition at line 130 of file FixedHash.h.
Referenced by dev::FixedHash< N >::operator<=().
|
inline |
Fast equality operator for h256.
Definition at line 456 of file FixedHash.h.
References dev::FixedHash< N >::data().

|
inline |
Definition at line 143 of file FixedHash.h.
References dev::FixedHash< N >::operator<=().

|
inline |
Definition at line 141 of file FixedHash.h.
References dev::FixedHash< N >::operator<().

|
inline |
Definition at line 187 of file FixedHash.h.
|
inline |
Definition at line 189 of file FixedHash.h.
|
inline |
Definition at line 152 of file FixedHash.h.
References dev::FixedHash< N >::FixedHash().

|
inline |
Definition at line 146 of file FixedHash.h.
|
inline |
Definition at line 159 of file FixedHash.h.
References dev::FixedHash< N >::FixedHash().

|
inline |
Definition at line 153 of file FixedHash.h.
|
inline |
Definition at line 167 of file FixedHash.h.
|
inlinestatic |
Definition at line 239 of file FixedHash.h.
References dev::FixedHash< N >::randomize().

|
inline |
Populate with random data.
Definition at line 232 of file FixedHash.h.
Referenced by dev::FixedHash< N >::random().
|
inline |
Definition at line 204 of file FixedHash.h.
Referenced by dev::FixedHash< N >::abridged(), dev::FixedHash< N >::abridgedMiddle(), dev::FixedHash< N >::hex(), dev::SecureFixedHash< T >::ref(), dev::sha3(), dev::sha3(), and dev::toAddress().
|
inline |
Definition at line 207 of file FixedHash.h.
|
inline |
Definition at line 248 of file FixedHash.h.