PROOFPadded.pd.go: def of bend-osdev-cbc@0.1.0.0 Import: import bend-osdev-cbc@0.1.0.0/PROOF_padded.bend as PROOFPadded Lines 131-136 of bend-osdev-cbc@0.1.0.0/PROOF_padded.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-cbc@0.1.0.0/PROOF_padded.bend&start_line=131&end_line=136 import 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 import bend-osdev-pkcs7@0.1.0.0/pkcs7.bend as P import bend-osdev-cbc@0.1.0.0/cbc.bend as C def pd.go(~K: Data, ~dec: K -> M.CmBlock -> M.CmBlock, +k: K, +iv: B.Octets, +mp: B.Octets, +m: B.Octets, e2: {P.Pkcs7.unpad(16n, mp) == Done{m} : Result<&2, &2, M.CmError, B.Octets>}, r: Result<&2, &2, M.CmError, B.Octets>) -> {Result.bind(&2, &2, M.CmError, B.Octets, B.Octets, r, c => C.Cbc.decrypt(~K, ~dec, k, iv, c)) == Done{mp} : Result<&2, &2, M.CmError, B.Octets>} -> {Result.bind(&2, &2, M.CmError, B.Octets, B.Octets, r, c => C.Cbc.decrypt_padded(~K, ~dec, k, iv, c)) == Done{m} : Result<&2, &2, M.CmError, B.Octets>}: match r: case Fail{e}: e1 => Empty.absurd({Fail{e} == Done{m} : Result<&2, &2, M.CmError, B.Octets>}, pd.fd(B.Octets, e, mp, e1)) case Done{+c}: e1 => pd.dc(~K, ~dec, k, iv, mp, m, e2, c, Nat.is_lt(0n, B.Octets.len(c)))({==})(e1) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result.bind https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.len https://jend.leeeet.dev/definition.txt?path=bend-osdev-cbc@0.1.0.0/PROOF_padded.bend&name=pd.dc https://jend.leeeet.dev/definition.txt?path=bend-osdev-cbc@0.1.0.0/PROOF_padded.bend&name=pd.fd https://jend.leeeet.dev/definition.txt?path=bend-osdev-cbc@0.1.0.0/cbc.bend&name=Cbc.decrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-cbc@0.1.0.0/cbc.bend&name=Cbc.decrypt_padded https://jend.leeeet.dev/definition.txt?path=bend-osdev-mode-core@0.1.0.0/mode_core.bend&name=CmBlock https://jend.leeeet.dev/definition.txt?path=bend-osdev-mode-core@0.1.0.0/mode_core.bend&name=CmError https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/pkcs7.bend&name=Pkcs7.unpad