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