Check.aes_ctr: def of bend-osdev-crypto@0.1.0.0 Import: import bend-osdev-crypto@0.1.0.0/check.bend as Check Lines 206-208 of bend-osdev-crypto@0.1.0.0/check.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-crypto@0.1.0.0/check.bend&start_line=206&end_line=208 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/aes.bend as X import bend-osdev-crypto@0.1.0.0/crypto.bend as Cr import bend-osdev-crypto@0.1.0.0/stream.bend as St 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 import bend-osdev-crypto@0.1.0.0/inst_aes.bend as A # CTR-AES as a stream cipher through the stream interface def aes_ctr(+k: B.Octets, +iv: B.Octets, m: B.Octets) -> Result<&2, &2, Cr.CrError, B.Octets>: St.CrStream.crypt(~Md.CrCtrState, ~St.CrXorOut>, ~Md.CrCtr.start(~X.CmAesKey, ~16n, ~A.CrAes.key_enc), ~Md.CrCtr.update(~X.CmAesKey, ~M.CmBlock, ~X.CmAes.encrypt, ~CM.CrBlk128.of_octets, ~CM.CrBlk128.to_octets), ~St.CrXor.out_data(~Md.CrCtrState), k, iv, m) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result 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-cipher-modes@0.1.0.0/aes.bend&name=CmAes.encrypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/aes.bend&name=CmAesKey https://jend.leeeet.dev/definition.txt?path=bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend&name=CmBlock 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/inst_aes.bend&name=CrAes.key_enc https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/inst_cm.bend&name=CrBlk128.of_octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/inst_cm.bend&name=CrBlk128.to_octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/modes.bend&name=CrCtr.start https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/modes.bend&name=CrCtr.update https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/modes.bend&name=CrCtrState https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/stream.bend&name=CrStream.crypt https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/stream.bend&name=CrXor.out_data https://jend.leeeet.dev/definition.txt?path=bend-osdev-crypto@0.1.0.0/stream.bend&name=CrXorOut