def xts.d2.fast

bend-osdev-cipher-modes@0.1.0.0 · xts.bend:241

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

241def xts.d2.fast(~K: Data, ~dec: K -> M.CmBlock -> M.CmBlock, +k: K, +t: M.CmBlock, s: M.CmSplit, +n: Nat) -> Result<&2, &2, M.CmError, B.Octets>:
242  match s:
243    case M.CmSplit{bs, tail}:
244      match bs:
245        case Nil{}:
246          Fail{M.CmTooShort{n}}
247        case Con{+c, +rest}:
248          Done{B.Octets.of_list(xts.dout.fast(~K, ~dec, k, t, xts.init.fast(rest, c), xts.last(rest, c), tail))}

Uses (11)

Used by (3)