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

Function simplicity_sha_256_block

src/simplicity/jets.c:1218–1227  ·  view source on GitHub ↗

sha_256_block : TWO^256 * TWO^512 |- TWO^256 */

Source from the content-addressed store, hash-verified

1216
1217/* sha_256_block : TWO^256 * TWO^512 |- TWO^256 */
1218bool simplicity_sha_256_block(frameItem* dst, frameItem src, const txEnv* env) {
1219 (void) env; /* env is unused. */
1220 uint32_t h[8];
1221 uint32_t block[16];
1222 read32s(h, 8, &src);
1223 read32s(block, 16, &src);
1224 simplicity_sha256_compression(h, block);
1225 write32s(dst, h, 8);
1226 return true;
1227}
1228
1229/* sha_256_ctx_8_init : ONE |- CTX8
1230 * where

Callers

nothing calls this directly

Calls 2

read32sFunction · 0.85
write32sFunction · 0.85

Tested by

no test coverage detected