def expanded_rounds

mylsm-lsm-store@0.6.0.1 · src/hub_sha/core.bend:123

import mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend as Core
import Base
import mylsm-lsm-store@0.6.0.1/src/hub_sha/state.bend as S

123# Generate each derived schedule word immediately before its round. The reverse
124# history is still retained for the recurrence, but the chronological 48-word
125# extension is never materialized.
126def expanded_rounds(rounds_left: Nat, +history: List<&2, U32>, ks: List<&2, U32>, state: S.State) -> S.State:
127  match rounds_left ks:
128    case 0n _:
129      state
130    case 1n+p Nil{}:
131      state
132    case 1n+p k <> kt:
133      +w = next_word(history)
134      expanded_rounds(p, w <> history, kt, step(state, k, w))

Uses (6)

Used by (1)