mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Add SHA256Uint256 helper functions
This commit is contained in:
@@ -77,3 +77,10 @@ void BIP32Hash(const ChainCode &chainCode, unsigned int nChild, unsigned char he
|
||||
num[3] = (nChild >> 0) & 0xFF;
|
||||
CHMAC_SHA512(chainCode.begin(), chainCode.size()).Write(&header, 1).Write(data, 32).Write(num, 4).Finalize(output);
|
||||
}
|
||||
|
||||
uint256 SHA256Uint256(const uint256& input)
|
||||
{
|
||||
uint256 result;
|
||||
CSHA256().Write(input.begin(), 32).Finalize(result.begin());
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user