def ecb

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

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

63def ecb(m: B.Octets) -> String:
64  +c = X.Lc64.ecb_encrypt(~L.LcBlock64, ~toy, toy_key(), m)
65  show(c) ++ " " ++ show(Result.bind(&2, &2, L.LcError, B.Octets, B.Octets, c, x => X.Lc64.ecb_decrypt(~L.LcBlock64, ~toy, toy_key(), x)))

Uses (11)

Used by (1)