[#CRYPTO_ocb128_copy_ctx]
= CRYPTO&lowbar;ocb128&lowbar;copy&lowbar;ctx
:mrdocs:

Copy an OCB context, optionally replacing the encrypt&sol;decrypt key pointers&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CRYPTO&lowbar;ocb128&lowbar;copy&lowbar;ctx(
    xref:OCB128_CONTEXT-0a.adoc[OCB128&lowbar;CONTEXT]* dest,
    xref:OCB128_CONTEXT-0a.adoc[OCB128&lowbar;CONTEXT]* src,
    void* keyenc,
    void* keydec);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dest*
| Destination context to initialise as a copy of `src&period;`
| *src*
| Source OCB context to copy&period;
| *keyenc*
| Replacement encrypt&hyphen;direction key, or NULL to keep `src&apos;s&period;`
| *keydec*
| Replacement decrypt&hyphen;direction key, or NULL to keep `src&apos;s&period;`
|===


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