[#EVP_CIPHER_CTX_get_original_iv]
= EVP&lowbar;CIPHER&lowbar;CTX&lowbar;get&lowbar;original&lowbar;iv
:mrdocs:

Copy the original IV from a cipher context into `buf&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;original&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&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Cipher context previously initialized with an IV&period;
| *buf*
| Destination buffer for the IV bytes&period;
| *len*
| Capacity of `buf` in bytes (must be at least the IV length)&period;
|===


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