def xencrypt_unchecked
import bend-collections@1.0.0.0/src/crypto/chacha/chacha20.bend as Chacha20import Base
126# XChaCha20: ChaCha20 under the HChaCha20 subkey of nonce[0..16], with the
127# nonce 0x00000000 || nonce[16..24].
128def xencrypt_unchecked(key_bytes: List<&2, U32>, counter: U32, +nonce_bytes: List<&2, U32>, +plaintext: List<&2, U32>) -> List<&2, U32>:
129 +sub = hchacha20_unchecked(key_bytes, take(16n, nonce_bytes))
130 encrypt_rounds(10n, sub, counter, 0 <> 0 <> 0 <> 0 <> skip(16n, nonce_bytes), plaintext)