def tf.h

bend-osdev-legacy-ciphers@0.1.0.0 · twofish.bend:149

import bend-osdev-legacy-ciphers@0.1.0.0/twofish.bend as Twofish
import Base

149# h(X, L) for L = L_0 .. L_(k-1), k = 2, 3 or 4
150def tf.h(+t: LcTfTabs, +x: U32, l: List<&2, U32>) -> U32:
151  match l:
152    case Con{l0, Con{l1, Nil{}}}:
153      tf.h2(t, x, l0, l1)
154    case Con{l0, Con{l1, Con{l2, Nil{}}}}:
155      tf.h3(t, x, l0, l1, l2)
156    case Con{l0, Con{l1, Con{l2, Con{l3, more}}}}:
157      tf.h4(t, x, l0, l1, l2, l3)
158    case _:
159      0

Uses (6)

Used by (2)