[#ChaCha20Aligned]
= ChaCha20Aligned
:mrdocs:

ChaCha20 cipher that only operates on multiples of 64 bytes&period;

== Synopsis

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

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

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:ChaCha20Aligned/Nonce96.adoc[`Nonce96`] 
| Type for 96&hyphen;bit nonces used by the Set function below&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:ChaCha20Aligned/2constructor-09.adoc[`ChaCha20Aligned`]         [.small]#[constructor]#
| Constructors
| xref:ChaCha20Aligned/2destructor.adoc[`&#126;ChaCha20Aligned`] [.small]#[destructor]#
| Destructor to clean up private memory&period;
| xref:ChaCha20Aligned/Crypt.adoc[`Crypt`] 
| en&sol;deciphers the message &lt;input&gt; and write the result into &lt;output&gt;
| xref:ChaCha20Aligned/Keystream.adoc[`Keystream`] 
| outputs the keystream into out, whose length must be a multiple of BLOCKLEN&period;
| xref:ChaCha20Aligned/Seek.adoc[`Seek`] 
| Set the 96&hyphen;bit nonce and 32&hyphen;bit block counter&period;
| xref:ChaCha20Aligned/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:ChaCha20Aligned/BLOCKLEN.adoc[`BLOCKLEN`] 
| Block size (inputs&sol;outputs to Keystream &sol; Crypt should be multiples of this)&period;
| xref:ChaCha20Aligned/KEYLEN.adoc[`KEYLEN`] 
| Expected key length in constructor and SetKey&period;
|===



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