def cbc.e2.fast

bend-osdev-cbc@0.1.0.0 · cbc.bend:105

import bend-osdev-cbc@0.1.0.0/cbc.bend as Cbc
import Base
import bend-osdev-bytes@0.1.1.0/bytes.bend as B
import bend-osdev-mode-core@0.1.0.0/mode_core.bend as M

105def cbc.e2.fast(~K: Data, ~enc: K -> M.CmBlock -> M.CmBlock, +k: K, v: M.CmBlock, s: M.CmSplit, +n: Nat) -> Result<&2, &2, M.CmError, B.Octets>:
106  match s:
107    case M.CmSplit{bs, tail}:
108      match tail:
109        case Nil{}:
110          Done{B.Octets.of_list(M.cm.join_onto.fast(cbc.enc.fast(~K, ~enc, k, bs, v), Nil{}))}
111        case Con{h, t}:
112          Fail{M.CmNotBlockMultiple{n}}

Uses (10)

Used by (3)