Given the identity hash of a jet specification, return the CMR for a jet that implements that specification. * * Precondition: uint32_t ih[8] */
| 82 | * Precondition: uint32_t ih[8] |
| 83 | */ |
| 84 | static sha256_midstate mkJetCMR(uint32_t *ih, uint_fast64_t weight) { |
| 85 | sha256_midstate result = jetIV; |
| 86 | uint32_t block[16] = {0}; |
| 87 | block[6] = (uint32_t)(weight >> 32); |
| 88 | block[7] = (uint32_t)weight; |
| 89 | memcpy(&block[8], ih, sizeof(uint32_t[8])); |
| 90 | simplicity_sha256_compression(result.s, block); |
| 91 | |
| 92 | return result; |
| 93 | } |
| 94 | |
| 95 | /* Compute the CMR of a jet of scribe(v) : ONE |- TWO^(2^n) that outputs a given bitstring. |
| 96 | * |
no outgoing calls
no test coverage detected