[#AEADChaCha20Poly1305-Decrypt-0b] = xref:AEADChaCha20Poly1305.adoc[AEADChaCha20Poly1305]::Decrypt :relfileprefix: ../ :mrdocs: Decrypt a message with a specified 96‐bit nonce and aad and split the result. Returns true if valid. == Synopsis Declared in `<crypto/chacha20poly1305.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool Decrypt( std::span<std::byte const> cipher, std::span<std::byte const> aad, xref:AEADChaCha20Poly1305/Nonce96.adoc[Nonce96] nonce, std::span<std::byte> plain1, std::span<std::byte> plain2) noexcept; ---- == Description Requires cipher.size() = plain1.size() + plain2.size() + EXPANSION. == Return Value true if the tag is valid and decryption succeeded, false otherwise. == Parameters [cols="1,4"] |=== | Name| Description | *cipher* | The ciphertext and authentication tag to decrypt and verify. | *aad* | The associated data to authenticate. | *nonce* | The 96‐bit nonce. | *plain1* | Output buffer receiving the first part of the recovered plaintext. | *plain2* | Output buffer receiving the second part of the recovered plaintext. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#