def schedule_rounds
bend-collections-laws-crypto@1.0.0.0 · src/crypto/sha/core.bend:117
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/core.bend as Core
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/state.bend as S
117
118def schedule_rounds(ws: List<&2, U32>, +extra: Nat, +history: List<&2, U32>, ks: List<&2, U32>, s: S.State) -> S.State:
119 match ws ks:
120 case Nil{} _:
121 expanded_rounds(extra, history, ks, s)
122 case w <> wt Nil{}:
123 s
124 case w <> wt k <> kt:
125 schedule_rounds(wt, extra, history, kt, step(s, k, w))