Chacha.state: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/spec/crypto/chacha.bend as Chacha Lines 98-104 of bend-collections@1.0.0.0/spec/crypto/chacha.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/spec/crypto/chacha.bend&start_line=98&end_line=104 import Base # The initial state: constants, key (eight words), block counter, nonce # (three words). Missing key or nonce words read as 0 (the public API # rejects other lengths before this is reached). def state(+k: List<&2, U32>, counter: U32, +n: List<&2, U32>) -> List<&2, U32>: List.append(&2, U32, constants(), [get(k, 0n), get(k, 1n), get(k, 2n), get(k, 3n), get(k, 4n), get(k, 5n), get(k, 6n), get(k, 7n), counter, get(n, 0n), get(n, 1n), get(n, 2n)]) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/chacha.bend&name=constants https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/spec/crypto/chacha.bend&name=get