def rotl
import bend-collections@1.0.0.0/spec/crypto/chacha.bend as Chachaimport Base
34# x <<< n: rotation of a 32-bit word left by n bits (0 < n < 32).
35def rotl(+x: U32, +n: Nat) -> U32:
36 U32.or(U32.shln(x, n), U32.shrn(x, Nat.sub(32n, n)))
import bend-collections@1.0.0.0/spec/crypto/chacha.bend as Chachaimport Base
34# x <<< n: rotation of a 32-bit word left by n bits (0 < n < 32).
35def rotl(+x: U32, +n: Nat) -> U32:
36 U32.or(U32.shln(x, n), U32.shrn(x, Nat.sub(32n, n)))