Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
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... | |
uint64_t | SipHashUint256Extra (uint64_t k0, uint64_t k1, const uint256 &val, uint32_t extra) |
Macro Definition Documentation
◆ ROTL
#define ROTL | ( | x, | |
b | |||
) | (uint64_t)(((x) << (b)) | ((x) >> (64 - (b)))) |
◆ SIPROUND
#define SIPROUND |
Definition at line 83 of file hash.cpp.
Referenced by CSipHasher::Finalize(), SipHashUint256(), SipHashUint256Extra(), and CSipHasher::Write().
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.
References base_blob< BITS >::begin(), CHMAC_SHA512::Finalize(), base_blob< BITS >::size(), and CHMAC_SHA512::Write().
Referenced by CKey::Derive(), and CPubKey::Derive().
◆ MurmurHash3()
unsigned int MurmurHash3 | ( | unsigned int | nHashSeed, |
const std::vector< unsigned char > & | vDataToHash | ||
) |
Definition at line 15 of file hash.cpp.
References k1, ReadLE32(), and ROTL32().
Referenced by CBloomFilter::Hash(), and RollingBloomHash().
◆ ROTL32()
|
inline |
Definition at line 10 of file hash.cpp.
Referenced by MurmurHash3().
◆ 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 168 of file hash.cpp.
References base_blob< BITS >::GetUint64(), k1, and SIPROUND.
Referenced by SaltedHasherImpl< uint256 >::CalcHash(), CBlockHeaderAndShortTxIDs::GetShortID(), HASH_SipHash_0032b(), and SaltedTxidHasher::operator()().
◆ SipHashUint256Extra()
uint64_t SipHashUint256Extra | ( | uint64_t | k0, |
uint64_t | k1, | ||
const uint256 & | val, | ||
uint32_t | extra | ||
) |
Definition at line 208 of file hash.cpp.
References base_blob< BITS >::GetUint64(), k1, and SIPROUND.
Referenced by SaltedHasherImpl< std::pair< uint256, N > >::CalcHash(), SaltedHasherImpl< std::pair< N, uint256 > >::CalcHash(), and SaltedOutpointHasher::operator()().