[#ChaCha20]
= ChaCha20
:mrdocs:

Unrestricted ChaCha20 cipher&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ChaCha20;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:ChaCha20/Nonce96.adoc[`Nonce96`] 
| 96&hyphen;bit nonce type&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:ChaCha20/2constructor-00.adoc[`ChaCha20`]         [.small]#[constructor]#
| Constructors
| xref:ChaCha20/2destructor.adoc[`&#126;ChaCha20`] [.small]#[destructor]#
| Destructor to clean up private memory&period;
| xref:ChaCha20/Crypt.adoc[`Crypt`] 
| en&sol;deciphers the message &lt;in&lowbar;bytes&gt; and write the result into &lt;out&lowbar;bytes&gt;
| xref:ChaCha20/Keystream.adoc[`Keystream`] 
| outputs the keystream to out&period;
| xref:ChaCha20/Seek.adoc[`Seek`] 
| Set the 96&hyphen;bit nonce and 32&hyphen;bit block counter&period; See ChaCha20Aligned&colon;&colon;Seek&period;
| xref:ChaCha20/SetKey.adoc[`SetKey`] 
| Set 32&hyphen;byte key, and seek to nonce 0 and block position 0&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:ChaCha20/KEYLEN.adoc[`KEYLEN`] 
| Expected key length in constructor and SetKey&period;
|===



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