From 6510d0ff4173a7b01d6728051303c7c38eb34533 Mon Sep 17 00:00:00 2001 From: Jeremy Rubin Date: Wed, 5 Feb 2020 11:57:32 -0800 Subject: Add SHA256Uint256 helper functions --- src/hash.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/hash.h') diff --git a/src/hash.h b/src/hash.h index 4f392fa0aa..c16bbb48ce 100644 --- a/src/hash.h +++ b/src/hash.h @@ -6,6 +6,7 @@ #ifndef BITCOIN_HASH_H #define BITCOIN_HASH_H +#include #include #include #include @@ -194,6 +195,9 @@ uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL return ss.GetHash(); } +/** Single-SHA256 a 32-byte input (represented as uint256). */ +NODISCARD uint256 SHA256Uint256(const uint256& input); + unsigned int MurmurHash3(unsigned int nHashSeed, Span vDataToHash); void BIP32Hash(const ChainCode &chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64]); -- cgit v1.2.3