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

Function getHash

src/simplicity/deserialize.c:36–38  ·  view source on GitHub ↗

Fetches a 256-bit hash value from 'stream' into 'result'. * Returns 'SIMPLICITY_ERR_BITSTREAM_EOF' if not enough bits are available ('result' may be modified). * Returns 'SIMPLICITY_NO_ERROR' if successful. * * Precondition: NULL != result * NULL != stream */

Source from the content-addressed store, hash-verified

34 * NULL != stream
35 */
36static simplicity_err getHash(sha256_midstate* result, bitstream* stream) {
37 return getWord32Array(result->s, 8, stream);
38}
39
40
41/* Decode a single node of a Simplicity dag from 'stream' into 'dag'['i'].

Callers 1

decodeNodeFunction · 0.85

Calls 1

getWord32ArrayFunction · 0.85

Tested by

no test coverage detected