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

Function sha256_init

src/simplicity/sha256.h:200–203  ·  view source on GitHub ↗

Initialize a sha256_context given a buffer in which the final output will be written to. * Note that the 'output' buffer may be updated during the computation to hold a SHA-256 midstate. * * Precondition: unit32_t output[8] */

Source from the content-addressed store, hash-verified

198 * Precondition: unit32_t output[8]
199 */
200static inline sha256_context sha256_init(uint32_t* output) {
201 sha256_iv(output);
202 return (sha256_context){ .output = output };
203}
204
205/* Initialize a sha256_context given a buffer in which the final output will be written to,
206 * and the midstate of a tagged hash.

Calls 1

sha256_ivFunction · 0.85

Tested by 1

hashintFunction · 0.68