def rotate

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/sha.bend:13

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/sha.bend as Sha
import Base

13# FIPS 4.1.2: ROR_n(x) = SHR_n(x) OR SHL_(32-n)(x).
14def rotate(+x: U32, +n: Nat) -> U32:
15  U32.or(U32.shrn(x, n), U32.shln(x, Nat.sub(32n, n)))

Uses (6)

Used by (4)