def scale

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/aes/poly.bend:18

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/poly.bend as Poly
import Base

18# c * a for a constant c in GF(2).
19def scale(+c: Bool, a: List<&2, Bool>) -> List<&2, Bool>:
20  match a:
21    case Nil{}:
22      Nil{}
23    case x <> xs:
24      Bool.and(c, x) <> scale(c, xs)

Uses (3)

Used by (5)