def word_bytes

bend-collections-laws-crypto@1.0.0.0 · src/crypto/kex.bend:32

import bend-collections-laws-crypto@1.0.0.0/src/crypto/kex.bend as Kex
import Base

32# 32 bytes from 8 words, little-endian
33def word_bytes(+w: U32, rest: List<&2, U32>) -> List<&2, U32>:
34  Con{U32.and(w, 255), Con{U32.and(U32.shrn(w, 8n), 255), Con{U32.and(U32.shrn(w, 16n), 255), Con{U32.shrn(w, 24n), rest}}}}

Uses (4)

Used by (1)