def xts.e2.fast
bend-osdev-cipher-modes@0.1.0.0 · xts.bend:232
import bend-osdev-cipher-modes@0.1.0.0/xts.bend as Xts
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M
232def xts.e2.fast(~K: Data, ~enc: K -> M.CmBlock -> M.CmBlock, +k: K, +t: M.CmBlock, s: M.CmSplit, +n: Nat) -> Result<&2, &2, M.CmError, B.Octets>:
233 match s:
234 case M.CmSplit{bs, tail}:
235 match bs:
236 case Nil{}:
237 Fail{M.CmTooShort{n}}
238 case Con{+p, +rest}:
239 Done{B.Octets.of_list(xts.eout.fast(~K, ~enc, k, t, xts.init.fast(rest, p), xts.last(rest, p), tail))}