[#CRYPTO_nistcts128_encrypt_block]
= CRYPTO&lowbar;nistcts128&lowbar;encrypt&lowbar;block
:mrdocs:

Encrypt with NIST CS2&sol;CS3&hyphen;style ciphertext stealing using a block encrypt function&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
size&lowbar;t
CRYPTO&lowbar;nistcts128&lowbar;encrypt&lowbar;block(
    unsigned char const* in,
    unsigned char* out,
    size&lowbar;t len,
    void const* key,
    unsigned char ivec[],
    xref:block128_f.adoc[block128&lowbar;f] block);
----

== Return Value

Number of ciphertext bytes written, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *in*
| Input plaintext of length `len` (must be at least 16)&period;
| *out*
| Output ciphertext buffer of length `len&period;`
| *len*
| Number of plaintext bytes&period;
| *key*
| Cipher&hyphen;specific expanded key for `block&period;`
| *ivec*
| 16&hyphen;byte IV updated like CBC&period;
| *block*
| Block&hyphen;encrypt function for the underlying cipher&period;
|===


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