AES256GCMCore.gcm_ctr_stream_exact.go: def of qasim-bend-kit@0.1.0.2 Import: import qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend as AES256GCMCore Lines 502-512 of qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend: https://jend.leeeet.dev/read.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend&start_line=502&end_line=512 import Base # Generate each AES counter block once and consume all of its bytes. Fuel is # still a byte count, so partial final blocks have exactly the requested length. def gcm_ctr_stream_exact.go(fuel: Nat, +words: List<&2, U32>, counter: List<&2, U32>, block: List<&2, U32>) -> List<&2, U32>: match fuel: case 0n: Nil{} case 1n+p: +step = gcm_ctr_step(words, counter, block) gcm_ctr_step_byte(step) <> gcm_ctr_stream_exact.go(p, words, gcm_ctr_step_counter(step), gcm_ctr_step_rest(step)) 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=qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend&name=gcm_ctr_step https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend&name=gcm_ctr_step_byte https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend&name=gcm_ctr_step_counter https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend&name=gcm_ctr_step_rest