[#CRYPTO_ctr128_encrypt_ctr32]
= CRYPTO&lowbar;ctr128&lowbar;encrypt&lowbar;ctr32
:mrdocs:

Encrypt or decrypt in CTR mode using a 32&hyphen;bit counter stream function&period;

== Synopsis

Declared in `&lt;openssl&sol;modes&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
CRYPTO&lowbar;ctr128&lowbar;encrypt&lowbar;ctr32(
    unsigned char const* in,
    unsigned char* out,
    size&lowbar;t len,
    void const* key,
    unsigned char ivec[],
    unsigned char ecount&lowbar;buf[],
    unsigned int* num,
    xref:ctr128_f.adoc[ctr128&lowbar;f] ctr);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *in*
| Input bytes of length `len&period;`
| *out*
| Output buffer of length `len` (may equal `in)&period;`
| *len*
| Number of bytes to process&period;
| *key*
| Cipher&hyphen;specific expanded key for `ctr&period;`
| *ivec*
| 16&hyphen;byte counter block updated as encryption proceeds&period;
| *ecount&lowbar;buf*
| 16&hyphen;byte buffer holding residual encrypted counter output&period;
| *num*
| Offset into `ecount&lowbar;buf` for residual keystream (updated&semi; start at 0)&period;
| *ctr*
| Multi&hyphen;block CTR stream function for the underlying cipher&period;
|===


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