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

Writes data to an underlying source stream, while hashing the written data. More...

#include <hash.h>

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

Public Member Functions

 HashedSourceWriter (Source &source LIFETIMEBOUND)
 
void write (Span< const std::byte > src)
 
template<typename T >
HashedSourceWriteroperator<< (const 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 HashedSourceWriter< Source >

Writes data to an underlying source stream, while hashing the written data.

Definition at line 184 of file hash.h.

Constructor & Destructor Documentation

◆ HashedSourceWriter()

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

Definition at line 190 of file hash.h.

Member Function Documentation

◆ operator<<()

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

Definition at line 199 of file hash.h.

Here is the call graph for this function:

◆ write()

template<typename Source >
void HashedSourceWriter< Source >::write ( Span< const std::byte >  src)
inline

Definition at line 192 of file hash.h.

Here is the call graph for this function:

Member Data Documentation

◆ m_source

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

Definition at line 187 of file hash.h.


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