26 for (
int i = 0; i <
nblocks; ++i) {
30 k1 = std::rotl(
k1, 15);
34 h1 = std::rotl(
h1, 13);
35 h1 =
h1 * 5 + 0xe6546b64;
54 k1 = std::rotl(
k1, 15);
A hasher class for HMAC-SHA-512.
CHMAC_SHA512 & Write(const unsigned char *data, size_t len)
void Finalize(unsigned char hash[OUTPUT_SIZE])
A hasher class for SHA-256.
void Finalize(unsigned char hash[OUTPUT_SIZE])
CSHA256 & Write(const unsigned char *data, size_t len)
A writer stream (for serialization) that computes a 256-bit hash.
constexpr unsigned char * begin()
uint32_t ReadLE32(const B *ptr)
void WriteBE32(B *ptr, uint32_t x)
void BIP32Hash(const ChainCode &chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64])
HashWriter TaggedHash(const std::string &tag)
Return a HashWriter primed for tagged hashes (as specified in BIP 340).
uint256 SHA256Uint256(const uint256 &input)
Single-SHA256 a 32-byte input (represented as uint256).
unsigned int MurmurHash3(unsigned int nHashSeed, std::span< const unsigned char > vDataToHash)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.