Lrw.CrLrw.decrypt: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/lrw.bend as Lrw Lines 145-151 of bend-osdev-crypto@0.1.0.0/lrw.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/lrw.bend&start_line=145&end_line=151 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-gf@0.1.0.0/gf128.bend as G import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr import bend-osdev-crypto@0.1.0.0/modes.bend as Md def CrLrw.decrypt(~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, kk: CrLrwKey, +iv: B.Octets, c: B.Octets) -> Result<&2, &2, Cr.CrError, B.Octets>: match kk: case CrLrwKey{+k, +k2}: do Result<&2, &2, Cr.CrError, B.Octets>: i : G.Gf128 <- cr.lrw.index(iv) bs : List<&2, Blk> <- Md.CrModes.blocks_of(~Blk, ~bsize, ~blk_of, c) return Md.CrModes.octets_of(~Blk, ~blk_to, CrLrw.decrypt_blocks(~K, ~Blk, ~dec, ~bxor, ~blk_of, k, k2, i, bs)) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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=Base/base.bend&name=Result.pure 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-crypto@0.1.0.0/crypto.bend&name=CrError https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/lrw.bend&name=CrLrw.decrypt_blocks https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/lrw.bend&name=CrLrwKey https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/lrw.bend&name=cr.lrw.index https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/modes.bend&name=CrModes.blocks_of https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/modes.bend&name=CrModes.octets_of https://jend.leeeet.dev/definition.txt?path=bend-osdev-gf@0.1.1.0/gf128.bend&name=Gf128