Bitcoin Core  27.99.0
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
HashVerifier< Source > Class Template Reference

Reads data from an underlying stream, while hashing the read data. More...

#include <hash.h>

Inheritance diagram for HashVerifier< Source >:
[legend]
Collaboration diagram for HashVerifier< Source >:
[legend]

Public Member Functions

 HashVerifier (Source &source LIFETIMEBOUND)
 
void read (Span< std::byte > dst)
 
void ignore (size_t num_bytes)
 
template<typename T >
HashVerifier< Source > & operator>> (T &&obj)
 
- Public Member Functions inherited from HashWriter
void write (Span< const std::byte > src)
 
uint256 GetHash ()
 Compute the double-SHA256 hash of all data written to this object. More...
 
uint256 GetSHA256 ()
 Compute the SHA256 hash of all data written to this object. More...
 
uint64_t GetCheapHash ()
 Returns the first 64 bits from the resulting hash. More...
 
template<typename T >
HashWriteroperator<< (const T &obj)
 

Private Attributes

Source & m_source
 

Detailed Description

template<typename Source>
class HashVerifier< Source >

Reads data from an underlying stream, while hashing the read data.

Definition at line 150 of file hash.h.

Constructor & Destructor Documentation

◆ HashVerifier()

template<typename Source >
HashVerifier< Source >::HashVerifier ( Source &source  LIFETIMEBOUND)
inlineexplicit

Definition at line 156 of file hash.h.

Member Function Documentation

◆ ignore()

template<typename Source >
void HashVerifier< Source >::ignore ( size_t  num_bytes)
inline

Definition at line 164 of file hash.h.

Here is the call graph for this function:

◆ operator>>()

template<typename Source >
template<typename T >
HashVerifier<Source>& HashVerifier< Source >::operator>> ( T &&  obj)
inline

Definition at line 175 of file hash.h.

Here is the call graph for this function:

◆ read()

template<typename Source >
void HashVerifier< Source >::read ( Span< std::byte >  dst)
inline

Definition at line 158 of file hash.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_source

template<typename Source >
Source& HashVerifier< Source >::m_source
private

Definition at line 153 of file hash.h.


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