BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
Public Member Functions | Private Attributes | List of all members
CHashWriter Class Reference

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

#include <hash.h>

Inheritance diagram for CHashWriter:
[legend]
Collaboration diagram for CHashWriter:
[legend]

Public Member Functions

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

Private Attributes

CHash3 ctx
 
const int nType
 
const int nVersion
 

Detailed Description

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

Definition at line 165 of file hash.h.

Constructor & Destructor Documentation

◆ CHashWriter()

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

Definition at line 174 of file hash.h.

Member Function Documentation

◆ GetHash()

uint256 CHashWriter::GetHash ( )
inline

Definition at line 184 of file hash.h.

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

◆ GetType()

int CHashWriter::GetType ( ) const
inline

Definition at line 176 of file hash.h.

◆ GetVersion()

int CHashWriter::GetVersion ( ) const
inline

Definition at line 177 of file hash.h.

◆ operator<<()

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

Definition at line 191 of file hash.h.

Here is the call graph for this function:

◆ write()

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

Definition at line 179 of file hash.h.

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

Member Data Documentation

◆ ctx

CHash3 CHashWriter::ctx
private

Definition at line 168 of file hash.h.

◆ nType

const int CHashWriter::nType
private

Definition at line 170 of file hash.h.

◆ nVersion

const int CHashWriter::nVersion
private

Definition at line 171 of file hash.h.


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