def Cbc.encrypt.ref
import bend-osdev-cbc@0.1.0.0/cbc.bend as Cbcimport 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
137# Cbc.encrypt and Cbc.decrypt through the structural forms (the laws' proofs
138# reason about these; PROOF.bend proves them equal to the public defs)
139def Cbc.encrypt.ref(~K: Data, ~enc: K -> M.CmBlock -> M.CmBlock, +k: K, iv: B.Octets, m: B.Octets) -> Result<&2, &2, M.CmError, B.Octets>:
140 cbc.e1(~K, ~enc, k, cbc.iv(iv), B.Octets.to_list(m))