def rotl

bend-collections@1.0.0.0 · spec/crypto/chacha.bend:34

import bend-collections@1.0.0.0/spec/crypto/chacha.bend as Chacha
import 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)))

Uses (6)

Used by (1)