def small0
bend-collections-laws-crypto@1.0.0.0 · src/crypto/sha512/core.bend:40
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha512/core.bend as Core
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha512/types.bend as T
40
41def small0(x: T.Lane) -> T.Lane:
42 match x:
43 case T.W{+hi, +lo}:
44 T.W{U32.xor(U32.xor(U32.or(U32.shrn(hi, 1n), U32.shln(lo, 31n)), U32.or(U32.shrn(hi, 8n), U32.shln(lo, 24n))), U32.shrn(hi, 7n)),
45 U32.xor(U32.xor(U32.or(U32.shrn(lo, 1n), U32.shln(hi, 31n)), U32.or(U32.shrn(lo, 8n), U32.shln(hi, 24n))), U32.or(U32.shrn(lo, 7n), U32.shln(hi, 25n)))}