def encrypt_rounds
import bend-collections@1.0.0.0/spec/crypto/chacha.bend as Chachaimport Base
166# chacha20_encrypt(key, counter, nonce, plaintext) with n double rounds.
167def encrypt_rounds(+n: Nat, +key: List<&2, U32>, counter: U32, +nonce: List<&2, U32>, +plaintext: List<&2, U32>) -> List<&2, U32>:
168 encrypt_blocks(blocks(List.length(&2, U32, plaintext), plaintext), n, key, counter, nonce)