Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
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 (std::span< const std::byte > src)
template<typename T>
HashedSourceWriteroperator<< (const T &obj)
Public Member Functions inherited from HashWriter
void write (std::span< const std::byte > src)
uint256 GetHash ()
 Compute the double-SHA256 hash of all data written to this object.
uint256 GetSHA256 ()
 Compute the SHA256 hash of all data written to this object.
uint64_t GetCheapHash ()
 Returns the first 64 bits from the resulting hash.
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.

Here is the caller graph for this function:

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 ( std::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: