def ad.cbc.decrypt_padded
bend-osdev-aead@0.1.0.0 · ivcipher.bend:28
import bend-osdev-aead@0.1.0.0/ivcipher.bend as Ivcipher
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-cipher-modes@0.1.0.0/pkcs7.bend as P7
import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr
import bend-osdev-crypto@0.1.0.0/modes.bend as Md
import bend-osdev-crypto@0.1.0.0/inst_cm.bend as CM
28def ad.cbc.decrypt_padded(~K: Data, ~Blk: Data, ~bsize: Nat, ~dec: K -> Blk -> Blk, ~bxor: Blk -> Blk -> Blk, ~blk_of: B.Octets -> Maybe<&2, Blk>, ~blk_to: Blk -> B.Octets, +k: K, +iv: B.Octets, c: B.Octets) -> Result<&2, &2, Cr.CrError, B.Octets>:
29 Result.bind(&2, &2, Cr.CrError, B.Octets, B.Octets, Md.CrCbc.decrypt(~K, ~Blk, ~bsize, ~dec, ~bxor, ~blk_of, ~blk_to, k, iv, c), x => CM.CrCm.lift(~B.Octets, P7.Pkcs7.unpad(bsize, x)))