def cbc

bend-osdev-cipher-core@0.1.0.0 · check.bend:67

import bend-osdev-cipher-core@0.1.0.0/check.bend as Check
import Base
import bend-osdev-bytes@0.1.1.0/bytes.bend as B
import bend-osdev-cipher-core@0.1.0.0/cipher_core.bend as L
import bend-osdev-cipher-core@0.1.0.0/modes64.bend as X

67def cbc(+v: B.Octets, m: B.Octets) -> String:
68  +c = X.Lc64.cbc_encrypt(~L.LcBlock64, ~toy, toy_key(), v, m)
69  show(c) ++ " " ++ show(Result.bind(&2, &2, L.LcError, B.Octets, B.Octets, c, x => X.Lc64.cbc_decrypt(~L.LcBlock64, ~toy, toy_key(), v, x)))

Uses (11)

Used by (1)