Gcm.bits_bytes: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/gcm.bend as Gcm Lines 26-32 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/gcm.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/aes/gcm.bend&start_line=26&end_line=32 import Base # The byte whose bits, leftmost first, are the next eight of a bit string. def bits_bytes(bs: List<&2, Bool>) -> List<&2, U32>: match bs: case b7 <> b6 <> b5 <> b4 <> b3 <> b2 <> b1 <> b0 <> rest: U32{WCon{b0, WCon{b1, WCon{b2, WCon{b3, WCon{b4, WCon{b5, WCon{b6, WCon{b7, Word.zero(24n)}}}}}}}}} <> bits_bytes(rest) case _: Nil{} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.Con https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Word.zero