def tf.key

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

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

321# the key from k = 2, 3 or 4 64-bit words of key bytes xs
322def tf.key(+k: Nat, +xs: List<&2, U32>) -> LcTwofishKey:
323  +t = tf.tables()
324  LcTwofishKey{tf.ops(tf.kpairs(20n, t, tf.words(k, xs, 0n), tf.words(k, xs, 1n), 0), t, tf.svec(k, xs, 0n, Nil{}))}

Uses (9)

Used by (2)