Bitcoin Core  27.99.0
P2P Digital Currency
Functions
hash.cpp File Reference
#include <hash.h>
#include <span.h>
#include <crypto/common.h>
#include <crypto/hmac_sha512.h>
#include <bit>
#include <string>
Include dependency graph for hash.cpp:

Go to the source code of this file.

Functions

unsigned int MurmurHash3 (unsigned int nHashSeed, Span< const unsigned char > vDataToHash)
 
void BIP32Hash (const ChainCode &chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64])
 
uint256 SHA256Uint256 (const uint256 &input)
 Single-SHA256 a 32-byte input (represented as uint256). More...
 
HashWriter TaggedHash (const std::string &tag)
 Return a HashWriter primed for tagged hashes (as specified in BIP 340). More...
 

Function Documentation

◆ BIP32Hash()

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

Definition at line 71 of file hash.cpp.

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

◆ MurmurHash3()

unsigned int MurmurHash3 ( unsigned int  nHashSeed,
Span< const unsigned char >  vDataToHash 
)

Definition at line 13 of file hash.cpp.

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

◆ SHA256Uint256()

uint256 SHA256Uint256 ( const uint256 input)

Single-SHA256 a 32-byte input (represented as uint256).

Definition at line 78 of file hash.cpp.

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

◆ TaggedHash()

HashWriter TaggedHash ( const std::string &  tag)

Return a HashWriter primed for tagged hashes (as specified in BIP 340).

The returned object will have SHA256(tag) written to it twice (= 64 bytes). A tagged hash can be computed by feeding the message into this object, and then calling HashWriter::GetSHA256().

Definition at line 85 of file hash.cpp.

Here is the call graph for this function: