Fabcoin Core  0.16.2
P2P Digital Currency
Public Types | Public Member Functions | Static Public Member Functions | List of all members
dev::SecureFixedHash< T > Class Template Reference

#include <FixedHash.h>

Inheritance diagram for dev::SecureFixedHash< T >:
[legend]
Collaboration diagram for dev::SecureFixedHash< T >:
[legend]

Public Types

using ConstructFromHashType = typename FixedHash< T >::ConstructFromHashType
 
using ConstructFromStringType = typename FixedHash< T >::ConstructFromStringType
 
using ConstructFromPointerType = typename FixedHash< T >::ConstructFromPointerType
 

Public Member Functions

 SecureFixedHash ()=default
 
 SecureFixedHash (bytes const &_b, ConstructFromHashType _t=FixedHash< T >::FailIfDifferent)
 
 SecureFixedHash (bytesConstRef _b, ConstructFromHashType _t=FixedHash< T >::FailIfDifferent)
 
 SecureFixedHash (bytesSec const &_b, ConstructFromHashType _t=FixedHash< T >::FailIfDifferent)
 
template<unsigned M>
 SecureFixedHash (FixedHash< M > const &_h, ConstructFromHashType _t=FixedHash< T >::AlignLeft)
 
template<unsigned M>
 SecureFixedHash (SecureFixedHash< M > const &_h, ConstructFromHashType _t=FixedHash< T >::AlignLeft)
 
 SecureFixedHash (std::string const &_s, ConstructFromStringType _t=FixedHash< T >::FromHex, ConstructFromHashType _ht=FixedHash< T >::FailIfDifferent)
 
 SecureFixedHash (bytes const *_d, ConstructFromPointerType _t)
 
 ~SecureFixedHash ()
 
SecureFixedHash< T > & operator= (SecureFixedHash< T > const &_c)
 
bytesSec asBytesSec () const
 
FixedHash< T > const & makeInsecure () const
 
FixedHash< T > & writable ()
 
bool operator== (SecureFixedHash const &_c) const
 
bool operator!= (SecureFixedHash const &_c) const
 
bool operator< (SecureFixedHash const &_c) const
 
bool operator>= (SecureFixedHash const &_c) const
 
bool operator<= (SecureFixedHash const &_c) const
 
bool operator> (SecureFixedHash const &_c) const
 
SecureFixedHashoperator^= (FixedHash< T > const &_c)
 
SecureFixedHash operator^ (FixedHash< T > const &_c) const
 
SecureFixedHashoperator|= (FixedHash< T > const &_c)
 
SecureFixedHash operator| (FixedHash< T > const &_c) const
 
SecureFixedHashoperator&= (FixedHash< T > const &_c)
 
SecureFixedHash operator& (FixedHash< T > const &_c) const
 
SecureFixedHashoperator^= (SecureFixedHash const &_c)
 
SecureFixedHash operator^ (SecureFixedHash const &_c) const
 
SecureFixedHashoperator|= (SecureFixedHash const &_c)
 
SecureFixedHash operator| (SecureFixedHash const &_c) const
 
SecureFixedHashoperator&= (SecureFixedHash const &_c)
 
SecureFixedHash operator& (SecureFixedHash const &_c) const
 
SecureFixedHash operator~ () const
 
bytesConstRef ref () const
 
byte const * data () const
 
void clear ()
 

Static Public Member Functions

static SecureFixedHash< Trandom ()
 

Additional Inherited Members

- Private Types inherited from dev::FixedHash< T >
enum  
 The size of the container. More...
 
enum  ConstructFromPointerType
 A dummy flag to avoid accidental construction from pointer. More...
 
enum  ConstructFromStringType
 Method to convert from a string. More...
 
enum  ConstructFromHashType
 Method to convert from a string. More...
 
using Arith = boost::multiprecision::number< boost::multiprecision::cpp_int_backend< N *8, N *8, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >>
 The corresponding arithmetic type. More...
 
- Private Member Functions inherited from dev::FixedHash< T >
 FixedHash ()
 Construct an empty hash. More...
 
 FixedHash (FixedHash< M > const &_h, ConstructFromHashType _t=AlignLeft)
 Construct from another hash, filling with zeroes or cropping as necessary. More...
 
 FixedHash (Arith const &_arith)
 Convert from the corresponding arithmetic type. More...
 
 FixedHash (unsigned _u)
 Convert from unsigned. More...
 
 FixedHash (bytes const &_b, ConstructFromHashType _t=FailIfDifferent)
 Explicitly construct, copying from a byte array. More...
 
 FixedHash (bytesConstRef _b, ConstructFromHashType _t=FailIfDifferent)
 Explicitly construct, copying from a byte array. More...
 
 FixedHash (byte const *_bs, ConstructFromPointerType)
 Explicitly construct, copying from a bytes in memory with given pointer. More...
 
 FixedHash (std::string const &_s, ConstructFromStringType _t=FromHex, ConstructFromHashType _ht=FailIfDifferent)
 Explicitly construct, copying from a string. More...
 
 operator Arith () const
 Convert to arithmetic type. More...
 
 operator bool () const
 
bool operator== (FixedHash const &_c) const
 
bool operator!= (FixedHash const &_c) const
 
bool operator< (FixedHash const &_c) const
 
bool operator>= (FixedHash const &_c) const
 
bool operator<= (FixedHash const &_c) const
 
bool operator> (FixedHash const &_c) const
 
FixedHashoperator^= (FixedHash const &_c)
 
FixedHash operator^ (FixedHash const &_c) const
 
FixedHashoperator|= (FixedHash const &_c)
 
FixedHash operator| (FixedHash const &_c) const
 
FixedHashoperator&= (FixedHash const &_c)
 
FixedHash operator& (FixedHash const &_c) const
 
FixedHash operator~ () const
 
FixedHashoperator++ ()
 
bool contains (FixedHash const &_c) const
 
byteoperator[] (unsigned _i)
 
byte operator[] (unsigned _i) const
 
std::string abridged () const
 
std::string abridgedMiddle () const
 
std::string hex () const
 
bytesRef ref ()
 
bytesConstRef ref () const
 
bytedata ()
 
byte const * data () const
 
bytes asBytes () const
 
std::array< byte, N > & asArray ()
 
std::array< byte, N > const & asArray () const
 
void randomize (Engine &_eng)
 Populate with random data. More...
 
FixedHashshiftBloom (FixedHash< M > const &_h)
 
bool containsBloom (FixedHash< M > const &_h)
 
FixedHash< M > bloomPart () const
 
unsigned firstBitSet () const
 Returns the index of the first bit set to one, or size() * 8 if no bits are set. More...
 
void clear ()
 
- Static Private Member Functions inherited from dev::FixedHash< T >
static FixedHash random ()
 

Detailed Description

template<unsigned T>
class dev::SecureFixedHash< T >

Definition at line 224 of file FixedHash.h.

Member Typedef Documentation

template<unsigned T>
using dev::SecureFixedHash< T >::ConstructFromHashType = typename FixedHash<T>::ConstructFromHashType

Definition at line 227 of file FixedHash.h.

Definition at line 229 of file FixedHash.h.

Definition at line 228 of file FixedHash.h.

Constructor & Destructor Documentation

template<unsigned T>
dev::SecureFixedHash< T >::SecureFixedHash ( )
default
template<unsigned T>
dev::SecureFixedHash< T >::SecureFixedHash ( bytes const &  _b,
ConstructFromHashType  _t = FixedHash<T>::FailIfDifferent 
)
inlineexplicit

Definition at line 231 of file FixedHash.h.

template<unsigned T>
dev::SecureFixedHash< T >::SecureFixedHash ( bytesConstRef  _b,
ConstructFromHashType  _t = FixedHash<T>::FailIfDifferent 
)
inlineexplicit

Definition at line 232 of file FixedHash.h.

template<unsigned T>
dev::SecureFixedHash< T >::SecureFixedHash ( bytesSec const &  _b,
ConstructFromHashType  _t = FixedHash<T>::FailIfDifferent 
)
inlineexplicit

Definition at line 233 of file FixedHash.h.

template<unsigned T>
template<unsigned M>
dev::SecureFixedHash< T >::SecureFixedHash ( FixedHash< M > const &  _h,
ConstructFromHashType  _t = FixedHash<T>::AlignLeft 
)
inlineexplicit

Definition at line 234 of file FixedHash.h.

template<unsigned T>
template<unsigned M>
dev::SecureFixedHash< T >::SecureFixedHash ( SecureFixedHash< M > const &  _h,
ConstructFromHashType  _t = FixedHash<T>::AlignLeft 
)
inlineexplicit

Definition at line 235 of file FixedHash.h.

template<unsigned T>
dev::SecureFixedHash< T >::SecureFixedHash ( std::string const &  _s,
ConstructFromStringType  _t = FixedHash<T>::FromHex,
ConstructFromHashType  _ht = FixedHash<T>::FailIfDifferent 
)
inlineexplicit

Definition at line 236 of file FixedHash.h.

template<unsigned T>
dev::SecureFixedHash< T >::SecureFixedHash ( bytes const *  _d,
ConstructFromPointerType  _t 
)
inlineexplicit

Definition at line 237 of file FixedHash.h.

template<unsigned T>
dev::SecureFixedHash< T >::~SecureFixedHash ( )
inline

Definition at line 238 of file FixedHash.h.

Member Function Documentation

template<unsigned T>
bytesSec dev::SecureFixedHash< T >::asBytesSec ( ) const
inline

Definition at line 251 of file FixedHash.h.

Here is the caller graph for this function:

template<unsigned T>
void dev::SecureFixedHash< T >::clear ( )
inline

Definition at line 298 of file FixedHash.h.

template<unsigned T>
byte const* dev::SecureFixedHash< T >::data ( ) const
inline

Definition at line 293 of file FixedHash.h.

Here is the caller graph for this function:

template<unsigned T>
FixedHash<T> const& dev::SecureFixedHash< T >::makeInsecure ( ) const
inline

Definition at line 253 of file FixedHash.h.

Here is the caller graph for this function:

template<unsigned T>
bool dev::SecureFixedHash< T >::operator!= ( SecureFixedHash< T > const &  _c) const
inline

Definition at line 260 of file FixedHash.h.

template<unsigned T>
SecureFixedHash dev::SecureFixedHash< T >::operator& ( FixedHash< T > const &  _c) const
inline

Definition at line 279 of file FixedHash.h.

template<unsigned T>
SecureFixedHash dev::SecureFixedHash< T >::operator& ( SecureFixedHash< T > const &  _c) const
inline

Definition at line 286 of file FixedHash.h.

template<unsigned T>
SecureFixedHash& dev::SecureFixedHash< T >::operator&= ( FixedHash< T > const &  _c)
inline

Definition at line 278 of file FixedHash.h.

template<unsigned T>
SecureFixedHash& dev::SecureFixedHash< T >::operator&= ( SecureFixedHash< T > const &  _c)
inline

Definition at line 285 of file FixedHash.h.

template<unsigned T>
bool dev::SecureFixedHash< T >::operator< ( SecureFixedHash< T > const &  _c) const
inline

Definition at line 261 of file FixedHash.h.

template<unsigned T>
bool dev::SecureFixedHash< T >::operator<= ( SecureFixedHash< T > const &  _c) const
inline

Definition at line 263 of file FixedHash.h.

template<unsigned T>
SecureFixedHash<T>& dev::SecureFixedHash< T >::operator= ( SecureFixedHash< T > const &  _c)
inline

Definition at line 240 of file FixedHash.h.

template<unsigned T>
bool dev::SecureFixedHash< T >::operator== ( SecureFixedHash< T > const &  _c) const
inline

Definition at line 259 of file FixedHash.h.

template<unsigned T>
bool dev::SecureFixedHash< T >::operator> ( SecureFixedHash< T > const &  _c) const
inline

Definition at line 264 of file FixedHash.h.

template<unsigned T>
bool dev::SecureFixedHash< T >::operator>= ( SecureFixedHash< T > const &  _c) const
inline

Definition at line 262 of file FixedHash.h.

template<unsigned T>
SecureFixedHash dev::SecureFixedHash< T >::operator^ ( FixedHash< T > const &  _c) const
inline

Definition at line 275 of file FixedHash.h.

template<unsigned T>
SecureFixedHash dev::SecureFixedHash< T >::operator^ ( SecureFixedHash< T > const &  _c) const
inline

Definition at line 282 of file FixedHash.h.

template<unsigned T>
SecureFixedHash& dev::SecureFixedHash< T >::operator^= ( FixedHash< T > const &  _c)
inline

Definition at line 274 of file FixedHash.h.

template<unsigned T>
SecureFixedHash& dev::SecureFixedHash< T >::operator^= ( SecureFixedHash< T > const &  _c)
inline

Definition at line 281 of file FixedHash.h.

template<unsigned T>
SecureFixedHash dev::SecureFixedHash< T >::operator| ( FixedHash< T > const &  _c) const
inline

Definition at line 277 of file FixedHash.h.

template<unsigned T>
SecureFixedHash dev::SecureFixedHash< T >::operator| ( SecureFixedHash< T > const &  _c) const
inline

Definition at line 284 of file FixedHash.h.

template<unsigned T>
SecureFixedHash& dev::SecureFixedHash< T >::operator|= ( FixedHash< T > const &  _c)
inline

Definition at line 276 of file FixedHash.h.

template<unsigned T>
SecureFixedHash& dev::SecureFixedHash< T >::operator|= ( SecureFixedHash< T > const &  _c)
inline

Definition at line 283 of file FixedHash.h.

template<unsigned T>
SecureFixedHash dev::SecureFixedHash< T >::operator~ ( ) const
inline

Definition at line 287 of file FixedHash.h.

template<unsigned T>
static SecureFixedHash<T> dev::SecureFixedHash< T >::random ( )
inlinestatic

Definition at line 295 of file FixedHash.h.

template<unsigned T>
bytesConstRef dev::SecureFixedHash< T >::ref ( ) const
inline

Definition at line 292 of file FixedHash.h.

Here is the caller graph for this function:

template<unsigned T>
FixedHash<T>& dev::SecureFixedHash< T >::writable ( )
inline

Definition at line 254 of file FixedHash.h.

Here is the caller graph for this function:


The documentation for this class was generated from the following file: