def tea.word
bend-osdev-legacy-ciphers@0.1.0.0 · tea.bend:107
import bend-osdev-legacy-ciphers@0.1.0.0/tea.bend as Tea
import Base
import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L
107
108def tea.word(le: Bool, +xs: List<&2, U32>, +i: Nat) -> U32:
109 match le:
110 case True{}:
111 L.lc.le(L.lc.at(xs, i), L.lc.at(xs, Nat.add(i, 1n)), L.lc.at(xs, Nat.add(i, 2n)), L.lc.at(xs, Nat.add(i, 3n)))
112 case False{}:
113 L.lc.be(L.lc.at(xs, i), L.lc.at(xs, Nat.add(i, 1n)), L.lc.at(xs, Nat.add(i, 2n)), L.lc.at(xs, Nat.add(i, 3n)))