Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Typedefs | Functions
hash.h File Reference
#include <crypto/ripemd160.h>
#include <crypto/sha256.h>
#include <prevector.h>
#include <serialize.h>
#include <uint256.h>
#include <version.h>
#include <vector>
Include dependency graph for hash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CHash256
 A hasher class for Fabcoin's 256-bit hash (double SHA-256). More...
 
class  CHash160
 A hasher class for Fabcoin's 160-bit hash (SHA-256 + RIPEMD-160). More...
 
class  CHashWriter
 A writer stream (for serialization) that computes a 256-bit hash. More...
 
class  CHashVerifier< Source >
 Reads data from an underlying stream, while hashing the read data. More...
 
class  CSipHasher
 SipHash-2-4. More...
 

Typedefs

typedef uint256 ChainCode
 

Functions

template<typename T1 >
uint256 Hash (const T1 pbegin, const T1 pend)
 Compute the 256-bit hash of an object. More...
 
template<typename T1 , typename T2 >
uint256 Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end)
 Compute the 256-bit hash of the concatenation of two objects. More...
 
template<typename T1 , typename T2 , typename T3 >
uint256 Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end)
 Compute the 256-bit hash of the concatenation of three objects. More...
 
template<typename T1 >
uint160 Hash160 (const T1 pbegin, const T1 pend)
 Compute the 160-bit hash an object. More...
 
uint160 Hash160 (const std::vector< unsigned char > &vch)
 Compute the 160-bit hash of a vector. More...
 
template<unsigned int N>
uint160 Hash160 (const prevector< N, unsigned char > &vch)
 Compute the 160-bit hash of a vector. More...
 
template<typename T >
uint256 SerializeHash (const T &obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
 Compute the 256-bit hash of an object's serialization. More...
 
unsigned int MurmurHash3 (unsigned int nHashSeed, const std::vector< unsigned char > &vDataToHash)
 
void BIP32Hash (const ChainCode &chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64])
 
uint64_t SipHashUint256 (uint64_t k0, uint64_t k1, const uint256 &val)
 Optimized SipHash-2-4 implementation for uint256. More...
 
uint64_t SipHashUint256Extra (uint64_t k0, uint64_t k1, const uint256 &val, uint32_t extra)
 

Typedef Documentation

typedef uint256 ChainCode

Definition at line 18 of file hash.h.

Function Documentation

void BIP32Hash ( const ChainCode chainCode,
unsigned int  nChild,
unsigned char  header,
const unsigned char  data[32],
unsigned char  output[64] 
)

Definition at line 72 of file hash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T1 >
uint256 Hash ( const T1  pbegin,
const T1  pend 
)
inline

Compute the 256-bit hash of an object.

Definition at line 70 of file hash.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T1 , typename T2 >
uint256 Hash ( const T1  p1begin,
const T1  p1end,
const T2  p2begin,
const T2  p2end 
)
inline

Compute the 256-bit hash of the concatenation of two objects.

Definition at line 81 of file hash.h.

Here is the call graph for this function:

template<typename T1 , typename T2 , typename T3 >
uint256 Hash ( const T1  p1begin,
const T1  p1end,
const T2  p2begin,
const T2  p2end,
const T3  p3begin,
const T3  p3end 
)
inline

Compute the 256-bit hash of the concatenation of three objects.

Definition at line 93 of file hash.h.

Here is the call graph for this function:

template<typename T1 >
uint160 Hash160 ( const T1  pbegin,
const T1  pend 
)
inline

Compute the 160-bit hash an object.

Definition at line 107 of file hash.h.

Here is the call graph for this function:

Here is the caller graph for this function:

uint160 Hash160 ( const std::vector< unsigned char > &  vch)
inline

Compute the 160-bit hash of a vector.

Definition at line 117 of file hash.h.

Here is the call graph for this function:

template<unsigned int N>
uint160 Hash160 ( const prevector< N, unsigned char > &  vch)
inline

Compute the 160-bit hash of a vector.

Definition at line 124 of file hash.h.

Here is the call graph for this function:

unsigned int MurmurHash3 ( unsigned int  nHashSeed,
const std::vector< unsigned char > &  vDataToHash 
)

Definition at line 16 of file hash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
uint256 SerializeHash ( const T obj,
int  nType = SER_GETHASH,
int  nVersion = PROTOCOL_VERSION 
)

Compute the 256-bit hash of an object's serialization.

Definition at line 200 of file hash.h.

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t SipHashUint256 ( uint64_t  k0,
uint64_t  k1,
const uint256 val 
)

Optimized SipHash-2-4 implementation for uint256.

It is identical to: SipHasher(k0, k1) .Write(val.GetUint64(0)) .Write(val.GetUint64(1)) .Write(val.GetUint64(2)) .Write(val.GetUint64(3)) .Finalize()

Definition at line 169 of file hash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

uint64_t SipHashUint256Extra ( uint64_t  k0,
uint64_t  k1,
const uint256 val,
uint32_t  extra 
)

Definition at line 209 of file hash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: