def xts.d2

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

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

176def xts.d2(~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>:
177  match s:
178    case M.CmSplit{bs, tail}:
179      match bs:
180        case Nil{}:
181          Fail{M.CmTooShort{n}}
182        case Con{+c, +rest}:
183          Done{B.Octets.of_list(xts.dout(~K, ~dec, k, t, xts.init(rest, c), xts.last(rest, c), tail))}

Uses (11)

Used by (5)