def CrOct.pieces

bend-osdev-crypto@0.1.0.0 · octets.bend:87

import bend-osdev-crypto@0.1.0.0/octets.bend as Octets
import Base

87# xs cut into pieces of n bytes, in order: every piece but the last has n
88# bytes, the last 1 to n (no pieces for no bytes)
89def CrOct.pieces(n: Nat, xs: List<&2, U32>) -> List<&2, List<&2, U32>>:
90  cr.oct.revs(cr.oct.pieces.go(xs, n, 0n, Nil{}, Nil{}), Nil{})

Uses (5)

Used by (5)