[#AEADChaCha20Poly1305-Keystream]
= xref:AEADChaCha20Poly1305.adoc[AEADChaCha20Poly1305]::Keystream
:relfileprefix: ../
:mrdocs:

Get a number of keystream bytes from the underlying stream cipher&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
Keystream(
    xref:AEADChaCha20Poly1305/Nonce96.adoc[Nonce96] nonce,
    std::span&lt;std::byte&gt; keystream) noexcept;
----

== Description

This is equivalent to Encrypt() with plain set to that many zero bytes, and dropping the last EXPANSION bytes off the result&period;

== Return Value

a number of keystream bytes from the underlying stream cipher&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *nonce*
| The 96&hyphen;bit nonce&period;
| *keystream*
| Output buffer receiving the keystream bytes&period;
|===


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