MCPcopy Create free account
hub / github.com/ElementsProject/elements / SerializeHash

Function SerializeHash

src/hash.h:217–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215/** Compute the 256-bit hash of an object's serialization, with optional sighash byte. */
216template<typename T>
217uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
218{
219 CHashWriter ss(nType, nVersion);
220 ss << obj;
221 return ss.GetHash();
222}
223
224/** Single-SHA256 a 32-byte input (represented as uint256). */
225[[nodiscard]] uint256 SHA256Uint256(const uint256& input);

Callers 15

AppInitMainFunction · 0.85
SerializeMethod · 0.85
UnserializeMethod · 0.85
GenerateAssetEntropyFunction · 0.85
GenericVerifyScriptFunction · 0.85
GenericSignScriptFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
GetHashMethod · 0.85
ComputeHashMethod · 0.85
ComputeWitnessHashMethod · 0.85
GetHashMethod · 0.85
CalculateRootMethod · 0.85

Calls 1

GetHashMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68