Bitcoin
Classes | Typedefs | Functions
hash.h File Reference
#include <crypto/common.h>
#include <crypto/ripemd160.h>
#include <crypto/sha256.h>
#include <prevector.h>
#include <serialize.h>
#include <uint256.h>
#include <version.h>
#include <vector>

Go to the source code of this file.

Classes

class  CHash256
 
class  CHash160
 
class  CHashWriter
 
class  CHashVerifier< Source >
 

Typedefs

typedef uint256 ChainCode
 

Functions

template<typename T1 >
uint256 Hash (const T1 pbegin, const T1 pend)
 
template<typename T1 , typename T2 >
uint256 Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end)
 
template<typename T1 >
uint160 Hash160 (const T1 pbegin, const T1 pend)
 
uint160 Hash160 (const std::vector< unsigned char > &vch)
 
template<unsigned int N>
uint160 Hash160 (const prevector< N, unsigned char > &vch)
 
template<typename T >
uint256 SerializeHash (const T &obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
 
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])
 

Typedef Documentation

◆ ChainCode

typedef uint256 ChainCode

Function Documentation

◆ BIP32Hash()

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

◆ Hash() [1/2]

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

Compute the 256-bit hash of an object.

◆ Hash() [2/2]

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.

◆ Hash160() [1/3]

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

Compute the 160-bit hash an object.

◆ Hash160() [2/3]

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

Compute the 160-bit hash of a vector.

◆ Hash160() [3/3]

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

Compute the 160-bit hash of a vector.

◆ MurmurHash3()

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

◆ SerializeHash()

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.