def xts.e2
bend-osdev-cipher-modes@0.1.0.0 · xts.bend:167
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
167def xts.e2(~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>:
168 match s:
169 case M.CmSplit{bs, tail}:
170 match bs:
171 case Nil{}:
172 Fail{M.CmTooShort{n}}
173 case Con{+p, +rest}:
174 Done{B.Octets.of_list(xts.eout(~K, ~enc, k, t, xts.init(rest, p), xts.last(rest, p), tail))}