def cr.ctr.add1

bend-osdev-crypto@0.1.0.0 · modes.bend:232

import bend-osdev-crypto@0.1.0.0/modes.bend as Modes
import Base

232# one added to a number given by its bytes, least significant first (rs),
233# the result most significant first, onto acc
234def cr.ctr.add1(rs: List<&2, U32>, +carry: Bool, acc: List<&2, U32>) -> List<&2, U32>:
235  match rs:
236    case Nil{}:
237      acc
238    case Con{+b, t}:
239      cr.ctr.add1(t, cr.ctr.carry(carry, b), Con{cr.ctr.sum(carry, b), acc})

Uses (5)

Used by (1)