def word_octets
import bend-collections@1.0.0.0/spec/crypto/sha.bend as Shaimport Base
182# FIPS digest serialization: most significant octet of each word first.
183def word_octets(+w: U32) -> List<&2, U32>:
184 [U32.and(U32.shrn(w, 24n), 255),
185 U32.and(U32.shrn(w, 16n), 255),
186 U32.and(U32.shrn(w, 8n), 255), U32.and(w, 255)]