def base256
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha512/core.bend as Coreimport Base
136def base256(width: Nat, +n: Nat) -> List<&2, U32>:
137 match width:
138 case 0n:
139 Nil{}
140 case 1n+p:
141 List.append(&2, U32, base256(p, Nat.div(n, 256n)), [U32.from_nat(Nat.mod(n, 256n))])