Sha.rotate: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/spec/crypto/sha.bend as Sha Lines 13-15 of bend-collections@1.0.0.0/spec/crypto/sha.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/spec/crypto/sha.bend&start_line=13&end_line=15 import Base # FIPS 4.1.2: ROR_n(x) = SHR_n(x) OR SHL_(32-n)(x). def rotate(+x: U32, +n: Nat) -> U32: U32.or(U32.shrn(x, n), U32.shln(x, Nat.sub(32n, n))) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shln https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn