def hs.rotl

bend-osdev-hashes@0.1.0.0 · hashes.bend:54

import bend-osdev-hashes@0.1.0.0/hashes.bend as Hashes
import 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)))

Uses (6)

Used by (9)