def ad.au.fit

bend-osdev-aead@0.1.0.0 · authenc.bend:49

import bend-osdev-aead@0.1.0.0/authenc.bend as Authenc
import Base

49# the first n bytes of xs, zero-padded to n
50def ad.au.fit(n: Nat, xs: List<&2, U32>) -> List<&2, U32>:
51  match n:
52    case 0n:
53      Nil{}
54    case 1n+m:
55      match xs:
56        case Nil{}:
57          Con{0, ad.au.fit(m, Nil{})}
58        case Con{h, t}:
59          Con{h, ad.au.fit(m, t)}

Uses (3)

Used by (3)