[#CRYPTO_gcm128_setiv]
= CRYPTO&lowbar;gcm128&lowbar;setiv
:mrdocs:

Set the GCM IV &sol; nonce for a subsequent encrypt or decrypt operation&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
CRYPTO&lowbar;gcm128&lowbar;setiv(
    xref:GCM128_CONTEXT-04.adoc[GCM128&lowbar;CONTEXT]* ctx,
    unsigned char const* iv,
    size&lowbar;t len);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| GCM context from CRYPTO&lowbar;gcm128&lowbar;new() or CRYPTO&lowbar;gcm128&lowbar;init()&period;
| *iv*
| IV octets (commonly 12 bytes for GCM)&period;
| *len*
| Length of `iv` in bytes&period;
|===


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