[#FSChaCha20Poly1305-Decrypt-0e]
= xref:FSChaCha20Poly1305.adoc[FSChaCha20Poly1305]::Decrypt
:relfileprefix: ../
:mrdocs:

`Decrypt` overloads

== Synopses

Declared in `&lt;crypto&sol;chacha20poly1305&period;h&gt;`

Decrypt a message with a specified aad&period; Returns true if valid&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:FSChaCha20Poly1305/Decrypt-05.adoc[Decrypt](
    std::span&lt;std::byte const&gt; cipher,
    std::span&lt;std::byte const&gt; aad,
    std::span&lt;std::byte&gt; plain) noexcept;
----

[.small]#xref:FSChaCha20Poly1305/Decrypt-05.adoc[_» more&period;&period;&period;_]#

Decrypt a message with a specified aad and split the result&period; Returns true if valid&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:FSChaCha20Poly1305/Decrypt-07.adoc[Decrypt](
    std::span&lt;std::byte const&gt; cipher,
    std::span&lt;std::byte const&gt; aad,
    std::span&lt;std::byte&gt; plain1,
    std::span&lt;std::byte&gt; plain2) noexcept;
----

[.small]#xref:FSChaCha20Poly1305/Decrypt-07.adoc[_» more&period;&period;&period;_]#

== Return Value

true if the tag is valid and decryption succeeded, false otherwise&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cipher*
| The ciphertext and authentication tag to decrypt and verify&period;
| *aad*
| The associated data to authenticate&period;
| *plain*
| Output buffer receiving the recovered plaintext&period;
| *plain1*
| Output buffer receiving the first part of the recovered plaintext&period;
| *plain2*
| Output buffer receiving the second part of the recovered plaintext&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
