def CrCcm.open
bend-osdev-crypto@0.1.0.0 · inst_ccm.bend:19
import bend-osdev-crypto@0.1.0.0/inst_ccm.bend as InstCcm
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
import bend-osdev-cipher-modes@0.1.0.0/ccm.bend as CC
import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr
import bend-osdev-crypto@0.1.0.0/inst_cm.bend as CM
19
20def CrCcm.open(~K: Data, ~enc: K -> M.CmBlock -> M.CmBlock, ~tlen: Nat, k: K, nonce: B.Octets, aad: B.Octets, c: B.Octets) -> Result<&2, &2, Cr.CrError, B.Octets>:
21 CM.CrCm.lift(~B.Octets, CC.Ccm.decrypt(~K, ~enc, k, tlen, nonce, aad, c))