Dogecoin Core  1.14.2
P2P Digital Currency
Macros | Functions
hash.cpp File Reference
#include "hash.h"
#include "crypto/common.h"
#include "crypto/hmac_sha512.h"
#include "pubkey.h"
Include dependency graph for hash.cpp:

Go to the source code of this file.

Macros

#define ROTL(x, b)   (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
 
#define SIPROUND
 

Functions

uint32_t ROTL32 (uint32_t x, int8_t r)
 
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...
 

Macro Definition Documentation

◆ ROTL

#define ROTL (   x,
 
)    (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))

Definition at line 85 of file hash.cpp.

◆ SIPROUND

#define SIPROUND
Value:
do { \
v0 += v1; v1 = ROTL(v1, 13); v1 ^= v0; \
v0 = ROTL(v0, 32); \
v2 += v3; v3 = ROTL(v3, 16); v3 ^= v2; \
v0 += v3; v3 = ROTL(v3, 21); v3 ^= v0; \
v2 += v1; v1 = ROTL(v1, 17); v1 ^= v2; \
v2 = ROTL(v2, 32); \
} while (0)
#define ROTL(x, b)
Definition: hash.cpp:85

Definition at line 87 of file hash.cpp.

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 75 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,
const std::vector< unsigned char > &  vDataToHash 
)

Definition at line 16 of file hash.cpp.

Here is the caller graph for this function:

◆ ROTL32()

uint32_t ROTL32 ( uint32_t  x,
int8_t  r 
)
inline

Definition at line 11 of file hash.cpp.

◆ SipHashUint256()

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 172 of file hash.cpp.

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