5#ifndef BITCOIN_UTIL_HASH_TYPE_H
6#define BITCOIN_UTIL_HASH_TYPE_H
8template <
typename HashType>
class BaseHash {
24 operator std::vector<uint8_t>()
const {
25 return std::vector<uint8_t>{
m_hash.begin(),
m_hash.end()};
31 return m_hash == other.m_hash;
35 return !(
m_hash == other.m_hash);
39 return m_hash < other.m_hash;
const uint8_t * end() const
std::string ToString() const
const uint8_t * data() const
bool operator==(const BaseHash< HashType > &other) const noexcept
bool operator!=(const BaseHash< HashType > &other) const noexcept
const uint8_t * begin() const
BaseHash(const HashType &in)
bool operator<(const BaseHash< HashType > &other) const noexcept
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...