def octets
import bend-collections@1.0.0.0/src/crypto/sha512/core.bend as Coreimport Base
161def octets(+x: U32, tail: List<&2, U32>) -> List<&2, U32>:
162 U32.and(U32.shrn(x, 24n), 255) <> U32.and(U32.shrn(x, 16n), 255) <>
163 U32.and(U32.shrn(x, 8n), 255) <> U32.and(x, 255) <> tail