def xseal
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha20poly1305.bend as Chacha20poly1305import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/chacha.bend as CH
64# XChaCha20-Poly1305: ChaCha20-Poly1305 under the HChaCha20 subkey of the
65# first 16 nonce bytes, with the nonce 0x00000000 || nonce[16..24].
66def xseal(+key: List<&2, U32>, +nonce: List<&2, U32>, +aad: List<&2, U32>, +pt: List<&2, U32>) -> List<&2, U32>:
67 seal(CH.xsubkey(key, nonce), CH.xnonce(nonce), aad, pt)