def pack
import ezx@1.11.0.0/src/share/sha.bend as Shaimport Base
9# four big-endian bytes in one word, each kept to eight bits
10def pack(first: U32, second: U32, third: U32, fourth: U32) -> U32:
11 (U32.shln((first .&. 255 : U32), 24n)
12 .|. U32.shln((second .&. 255 : U32), 16n)
13 .|. U32.shln((third .&. 255 : U32), 8n) .|. (fourth .&. 255) : U32)