Changeset View
Changeset View
Standalone View
Standalone View
src/hash.h
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | |||||
template <typename T> | template <typename T> | ||||
uint256 SerializeHash(const T &obj, int nType = SER_GETHASH, | uint256 SerializeHash(const T &obj, int nType = SER_GETHASH, | ||||
int nVersion = PROTOCOL_VERSION) { | int nVersion = PROTOCOL_VERSION) { | ||||
CHashWriter ss(nType, nVersion); | CHashWriter ss(nType, nVersion); | ||||
ss << obj; | ss << obj; | ||||
return ss.GetHash(); | return ss.GetHash(); | ||||
} | } | ||||
uint32_t MurmurHash3(uint32_t nHashSeed, | uint32_t MurmurHash3(uint32_t nHashSeed, Span<const uint8_t> vDataToHash); | ||||
const std::vector<uint8_t> &vDataToHash); | |||||
void BIP32Hash(const ChainCode &chainCode, uint32_t nChild, uint8_t header, | void BIP32Hash(const ChainCode &chainCode, uint32_t nChild, uint8_t header, | ||||
const uint8_t data[32], uint8_t output[64]); | const uint8_t data[32], uint8_t output[64]); | ||||
#endif // BITCOIN_HASH_H | #endif // BITCOIN_HASH_H |