def hs.rotl
import bend-osdev-hashes@0.1.0.0/hashes.bend as Hashesimport Base
54# x rotated left by n (1 to 31)
55def hs.rotl(+x: U32, +n: Nat) -> U32:
56 U32.or(U32.shln(x, n), U32.shrn(x, Nat.sub(32n, n)))
import bend-osdev-hashes@0.1.0.0/hashes.bend as Hashesimport Base
54# x rotated left by n (1 to 31)
55def hs.rotl(+x: U32, +n: Nat) -> U32:
56 U32.or(U32.shln(x, n), U32.shrn(x, Nat.sub(32n, n)))