ModeCore.CmBlock.dec_enc: def of bend-osdev-mode-core@0.1.0.0 Import: import bend-osdev-mode-core@0.1.0.0/mode_core.bend as ModeCore Lines 49-57 of bend-osdev-mode-core@0.1.0.0/mode_core.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-mode-core@0.1.0.0/mode_core.bend&start_line=49&end_line=57 import Base # Each block of xs encrypted under k and decrypted again: xs itself for # every list exactly where decryption undoes encryption at k, which is how # the round-trip laws (LAWS.bend) take that property of the cipher def CmBlock.dec_enc(~K: Data, ~enc: K -> CmBlock -> CmBlock, ~dec: K -> CmBlock -> CmBlock, +k: K, xs: List<&2, CmBlock>) -> List<&2, CmBlock>: match xs: case Nil{}: Nil{} case Con{x, t}: Con{dec(k, enc(k, x)), CmBlock.dec_enc(~K, ~enc, ~dec, k, t)} Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=bend-osdev-mode-core@0.1.0.0/mode_core.bend&name=CmBlock