sha_256_ctx_8_add_buffer_511 : CTX8 * (TWO^8)^<512 |- CTX8 * where * CTX8 = (TWO^8)^<64 * TWO^64 * TWO^256 */
| 1353 | * CTX8 = (TWO^8)^<64 * TWO^64 * TWO^256 |
| 1354 | */ |
| 1355 | bool simplicity_sha_256_ctx_8_add_buffer_511(frameItem* dst, frameItem src, const txEnv* env) { |
| 1356 | (void) env; /* env is unused. */ |
| 1357 | sha256_midstate midstate; |
| 1358 | unsigned char buf[511]; |
| 1359 | size_t buf_len; |
| 1360 | sha256_context ctx = {.output = midstate.s}; |
| 1361 | |
| 1362 | if (!simplicity_read_sha256_context(&ctx, &src)) return false; |
| 1363 | |
| 1364 | simplicity_read_buffer8(buf, &buf_len, &src, 8); |
| 1365 | sha256_uchars(&ctx, buf, buf_len); |
| 1366 | return simplicity_write_sha256_context(dst, &ctx); |
| 1367 | } |
| 1368 | |
| 1369 | /* sha_256_ctx_8_finalize : CTX8 |- TWO^256 |
| 1370 | * where |
nothing calls this directly
no test coverage detected