def cast.mix

bend-osdev-legacy-ciphers@0.1.0.0 · cast5.bend:390

import bend-osdev-legacy-ciphers@0.1.0.0/cast5.bend as Cast5
import Base

390# a word of z (or x) from a word of x (or z): w ^ S5[a] ^ S6[b] ^ S7[c] ^
391# S8[d] ^ Sj[e], bytes a .. d of the half being built so far (cur) and e of
392# the other (src)
393def cast.mix(+t: LcCastKTabs, +w: U32, +cur: List<&2, U32>, ia: Nat, ib: Nat, ic: Nat, id: Nat, +src: List<&2, U32>, j: Nat, ie: Nat) -> U32:
394  U32.xor(U32.xor(U32.xor(w, cast.ks(t, 5n, cur, ia)), U32.xor(cast.ks(t, 6n, cur, ib), cast.ks(t, 7n, cur, ic))), U32.xor(cast.ks(t, 8n, cur, id), cast.ks(t, j, src, ie)))

Uses (6)

Used by (2)