[#FSChaCha20Poly1305-Encrypt-02] = xref:FSChaCha20Poly1305.adoc[FSChaCha20Poly1305]::Encrypt :relfileprefix: ../ :mrdocs: Encrypt a message (given split into plain1 + plain2) with a specified aad. == Synopsis Declared in `<crypto/chacha20poly1305.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void Encrypt( std::span<std::byte const> plain1, std::span<std::byte const> plain2, std::span<std::byte const> aad, std::span<std::byte> cipher) noexcept; ---- == Description Requires cipher.size() = plain.size() + EXPANSION. == Parameters [cols="1,4"] |=== | Name| Description | *plain1* | The first part of the plaintext to encrypt. | *plain2* | The second part of the plaintext to encrypt. | *aad* | The associated data to authenticate but not encrypt. | *cipher* | Output buffer receiving the ciphertext and authentication tag. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#