Bitcoin
Public Member Functions | Private Attributes | List of all members
CHashWriter Class Reference

#include <hash.h>

Inheritance diagram for CHashWriter:
CHashVerifier< Source >

Public Member Functions

 CHashWriter (int nTypeIn, int nVersionIn)
 
int GetType () const
 
int GetVersion () const
 
void write (const char *pch, size_t size)
 
uint256 GetHash ()
 
uint64_t GetCheapHash ()
 
template<typename T >
CHashWriteroperator<< (const T &obj)
 

Private Attributes

CHash256 ctx
 
const int nType
 
const int nVersion
 

Detailed Description

A writer stream (for serialization) that computes a 256-bit hash.

Constructor & Destructor Documentation

◆ CHashWriter()

CHashWriter::CHashWriter ( int  nTypeIn,
int  nVersionIn 
)
inline

Member Function Documentation

◆ GetCheapHash()

uint64_t CHashWriter::GetCheapHash ( )
inline

Returns the first 64 bits from the resulting hash.

◆ GetHash()

uint256 CHashWriter::GetHash ( )
inline

◆ GetType()

int CHashWriter::GetType ( ) const
inline

◆ GetVersion()

int CHashWriter::GetVersion ( ) const
inline

◆ operator<<()

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

◆ write()

void CHashWriter::write ( const char *  pch,
size_t  size 
)
inline

Member Data Documentation

◆ ctx

CHash256 CHashWriter::ctx
private

◆ nType

const int CHashWriter::nType
private

◆ nVersion

const int CHashWriter::nVersion
private

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