[#EVP_CIPHER_CTX_get_updated_iv]
= EVP&lowbar;CIPHER&lowbar;CTX&lowbar;get&lowbar;updated&lowbar;iv
:mrdocs:

Copy the current IV state from a cipher context into a buffer&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;CIPHER&lowbar;CTX&lowbar;get&lowbar;updated&lowbar;iv(
    xref:EVP_CIPHER_CTX.adoc[EVP&lowbar;CIPHER&lowbar;CTX]* ctx,
    void* buf,
    size&lowbar;t len);
----

== Return Value

1 on success, or 0 on failure (including if `buf` is too small)&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Cipher context whose updated IV is read&period;
| *buf*
| Destination buffer that receives the IV bytes&period;
| *len*
| Size of `buf` in bytes&semi; must be at least EVP&lowbar;CIPHER&lowbar;CTX&lowbar;get&lowbar;iv&lowbar;length(`ctx)&period;`
|===


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