def cam.rotb

bend-osdev-camellia@0.1.0.0 · camellia.bend:206

import bend-osdev-camellia@0.1.0.0/camellia.bend as Camellia
import Base
import bend-osdev-mode-core@0.1.0.0/mode_core.bend as M

206def cam.rotb(q: M.CmBlock, +r: Nat) -> M.CmBlock:
207  match q:
208    case M.CmBlock{+a, +b, +c, +d}:
209      +s = Nat.sub(32n, r)
210      M.CmBlock{U32.or(U32.shln(a, r), U32.shrn(b, s)), U32.or(U32.shln(b, r), U32.shrn(c, s)), U32.or(U32.shln(c, r), U32.shrn(d, s)), U32.or(U32.shln(d, r), U32.shrn(a, s))}

Uses (6)

Used by (1)