Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <crypto/ripemd160.h>
#include <crypto/sha256.h>
#include <prevector.h>
#include <serialize.h>
#include <uint256.h>
#include <version.h>
#include <crypto/sph_blake.h>
#include <crypto/sph_bmw.h>
#include <crypto/sph_groestl.h>
#include <crypto/sph_jh.h>
#include <crypto/sph_keccak.h>
#include <crypto/sph_skein.h>
#include <crypto/sph_luffa.h>
#include <crypto/sph_cubehash.h>
#include <crypto/sph_shavite.h>
#include <crypto/sph_simd.h>
#include <crypto/sph_echo.h>
#include <vector>
Go to the source code of this file.
Classes | |
class | CHash256 |
A hasher class for Bitcoin's 256-bit hash (double SHA-256). More... | |
class | CHash160 |
A hasher class for Bitcoin'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 , typename T4 > | |
uint256 | Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end, const T4 p4begin, const T4 p4end) |
Compute the 256-bit hash of the concatenation of three objects. More... | |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
uint256 | Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end, const T4 p4begin, const T4 p4end, const T5 p5begin, const T5 p5end) |
Compute the 256-bit hash of the concatenation of three objects. More... | |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > | |
uint256 | Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end, const T4 p4begin, const T4 p4end, const T5 p5begin, const T5 p5end, const T6 p6begin, const T6 p6end) |
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) |
template<typename T1 > | |
uint256 | HashX11 (const T1 pbegin, const T1 pend) |
Typedef Documentation
◆ ChainCode
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().
◆ Hash() [1/5]
|
inline |
Compute the 256-bit hash of an object.
Definition at line 84 of file hash.h.
References CHash256::Finalize(), and CHash256::Write().
Referenced by immer::detail::hamts::champ< value_t, hash_key, equal_key, MemoryPolicy, B >::add(), CPartialMerkleTree::CalcHash(), DecodeBase58Check(), immer::detail::hamts::champ< value_t, hash_key, equal_key, MemoryPolicy, B >::do_add(), immer::detail::hamts::champ< value_t, hash_key, equal_key, MemoryPolicy, B >::do_update(), EncodeBase58Check(), immer::detail::hamts::champ< value_t, hash_key, equal_key, MemoryPolicy, B >::get(), CNetAddr::GetHash(), CPubKey::GetHash(), CHDChain::GetSeedHash(), immer::map< K, T, Hash, Equal, MemoryPolicy, B >::hash_key::operator()(), CConnman::PushMessage(), CFlatDB< T >::Read(), ReadKeyValue(), immer::detail::hamts::champ< value_t, hash_key, equal_key, MemoryPolicy, B >::sub(), CPartialMerkleTree::TraverseAndExtract(), immer::detail::hamts::champ< value_t, hash_key, equal_key, MemoryPolicy, B >::update(), CFlatDB< T >::Write(), and WalletBatch::WriteKey().
◆ Hash() [2/5]
|
inline |
Compute the 256-bit hash of the concatenation of two objects.
Definition at line 95 of file hash.h.
References CHash256::Finalize(), and CHash256::Write().
◆ Hash() [3/5]
|
inline |
Compute the 256-bit hash of the concatenation of three objects.
Definition at line 107 of file hash.h.
References CHash256::Finalize(), and CHash256::Write().
◆ Hash() [4/5]
|
inline |
Compute the 256-bit hash of the concatenation of three objects.
Definition at line 123 of file hash.h.
References CHash256::Finalize(), and CHash256::Write().
◆ Hash() [5/5]
|
inline |
Compute the 256-bit hash of the concatenation of three objects.
Definition at line 141 of file hash.h.
References CHash256::Finalize(), and CHash256::Write().
◆ Hash160() [1/3]
|
inline |
Compute the 160-bit hash an object.
Definition at line 161 of file hash.h.
References CHash160::Finalize(), and CHash160::Write().
Referenced by CTxMemPool::addAddressIndex(), CWallet::AddCScript(), CTxMemPool::addSpentIndex(), CChainState::ConnectBlock(), CChainState::DisconnectBlock(), CPubKey::GetID(), and Hash160().
◆ Hash160() [2/3]
|
inline |
◆ Hash160() [3/3]
Compute the 160-bit hash of a vector.
Definition at line 178 of file hash.h.
References prevector< N, T, Size, Diff >::begin(), prevector< N, T, Size, Diff >::end(), and Hash160().
◆ HashX11()
|
inline |
Definition at line 302 of file hash.h.
References sph_cubehash512(), sph_cubehash512_close(), sph_cubehash512_init(), sph_echo512(), sph_echo512_close(), sph_echo512_init(), sph_groestl512(), sph_groestl512_close(), sph_groestl512_init(), sph_jh512(), sph_jh512_close(), sph_jh512_init(), sph_keccak512(), sph_keccak512_close(), sph_keccak512_init(), sph_luffa512(), sph_luffa512_close(), sph_luffa512_init(), sph_shavite512(), sph_shavite512_close(), sph_shavite512_init(), sph_simd512(), sph_simd512_close(), sph_simd512_init(), and uint512::trim256().
Referenced by CBlockHeader::GetHash(), HASH_X11(), HASH_X11_0032b_single(), HASH_X11_0080b_single(), HASH_X11_0128b_single(), HASH_X11_0512b_single(), HASH_X11_1024b_single(), and HASH_X11_2048b_single().
◆ 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().
◆ SerializeHash()
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 254 of file hash.h.
References CHashWriter::GetHash().
Referenced by llmq::CQuorumBlockProcessor::AddMinableCommitment(), CTxMemPool::addUnchecked(), CDeterministicMNList::AddUniqueProperty(), CalcCbTxMerkleRootQuorums(), llmq::CLLMQUtils::CalcDeterministicWatchConnections(), CheckHashSig(), CTransaction::ComputeHash(), CChainState::ConnectBlock(), CBLSIESMultiRecipientBlobs::Decrypt(), CDeterministicMNList::DeleteUniqueProperty(), llmq::CLLMQUtils::DeterministicOutboundConnection(), ECDSASign(), ECDSAVerify(), ECDSAVerify_LargeBlock(), llmq::CLLMQUtils::GetAllQuorumMembers(), CSporkMessage::GetHash(), CMutableTransaction::GetHash(), CGovernanceVote::GetSignatureHash(), CGovernanceObject::GetSignatureHash(), CPrivateSendQueue::GetSignatureHash(), CPrivateSendBroadcastTx::GetSignatureHash(), llmq::CDKGComplaint::GetSignHash(), llmq::CDKGJustification::GetSignHash(), CDeterministicMNList::GetUniquePropertyMN(), llmq::CInstantSendManager::HandleNewInputLockRecoveredSig(), llmq::CInstantSendManager::HandleNewInstantSendLockRecoveredSig(), llmq::CChainLocksHandler::HandleNewRecoveredSig(), CDeterministicMNList::HasUniqueProperty(), CBLSIESMultiRecipientBlobs::InitEncrypt(), CProRegTx::MakeSignString(), llmq::CInstantSendManager::ProcessInstantSendLock(), llmq::CQuorumBlockProcessor::ProcessMessage(), CMNAuth::ProcessMessage(), llmq::CChainLocksHandler::ProcessMessage(), llmq::CInstantSendManager::ProcessMessageInstantSendLock(), llmq::CChainLocksHandler::ProcessNewChainLock(), llmq::ProcessPendingMessageBatch(), llmq::CInstantSendManager::ProcessTx(), CMNAuth::PushMNAUTH(), llmq::CDKGSession::ReceiveMessage(), llmq::CInstantSendManager::RemoveConflictedTx(), CTxMemPool::removeProTxConflicts(), llmq::CSigSharesManager::SelectMemberForRecovery(), llmq::CDKGSession::SendCommitment(), llmq::CInstantSendManager::TruncateRecoveredSigsForInputs(), llmq::CChainLocksHandler::TrySignChainTip(), llmq::CInstantSendManager::TrySignInstantSendLock(), llmq::CRecoveredSig::UpdateHash(), and CBLSWrapper< bls::InsecureSignature, BLS_CURVE_SIG_SIZE, CBLSSignature >::UpdateHash().
◆ 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()().