def lane_bytes
bend-collections-laws-crypto@1.0.0.0 · spec/crypto/sha3.bend:93
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/sha3.bend as Sha3
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/keccak/types.bend as T
93
94def lane_bytes(l: T.Lane) -> List<&2, U32>:
95 match l:
96 case T.W{+lo, +hi}:
97 [U32.and(lo, 255), U32.and(U32.shrn(lo, 8n), 255), U32.and(U32.shrn(lo, 16n), 255), U32.shrn(lo, 24n),
98 U32.and(hi, 255), U32.and(U32.shrn(hi, 8n), 255), U32.and(U32.shrn(hi, 16n), 255), U32.shrn(hi, 24n)]