def seal
import bend-collections@1.0.0.0/src/crypto/aead/chacha20poly1305.bend as Chacha20poly1305import Base
45# ciphertext || tag, without length checks.
46def seal(+key: List<&2, U32>, +nonce: List<&2, U32>, +aad: List<&2, U32>, +pt: List<&2, U32>) -> List<&2, U32>:
47 +ct = encrypt_ct(key, nonce, pt)
48 List.append(&2, U32, ct, tag(key, nonce, aad, ct))