def tea.g

bend-osdev-legacy-ciphers@0.1.0.0 · tea.bend:33

import bend-osdev-legacy-ciphers@0.1.0.0/tea.bend as Tea
import Base

33# TEA's function of one half: ((x << 4) + a) xor (x + s) xor ((x >> 5) + b)
34def tea.g(+x: U32, s: U32, a: U32, b: U32) -> U32:
35  U32.xor(U32.xor(U32.add(U32.shln(x, 4n), a), U32.add(x, s)), U32.add(U32.shrn(x, 5n), b))

Uses (5)

Used by (4)