Check.bulk.go: def of bend-osdev-cipher-modes@0.1.0.0 Import: import bend-osdev-cipher-modes@0.1.0.0/check.bend as Check Lines 47-58 of bend-osdev-cipher-modes@0.1.0.0/check.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-cipher-modes@0.1.0.0/check.bend&start_line=47&end_line=58 import Base # Longer messages, as a regression test for long inputs: 32 KB of # pseudo-random bytes (a linear congruential generator) through CBC, and 32 KB # and 5 bytes through XTS (ciphertext stealing), each encrypted and decrypted # back; the last 16 bytes of each ciphertext were checked against Python's # cryptography def bulk.go(n: Nat, +s: U32, acc: List<&2, U32>) -> List<&2, U32>: match n: case 0n: acc case 1n+p: +s2 = U32.add(U32.mul(s, 1103515245), 12345) bulk.go(p, s2, Con{U32.and(U32.shrn(s2, 16n), 255), acc}) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn