[#CRYPTO_ocb128_init]
= CRYPTO&lowbar;ocb128&lowbar;init
:mrdocs:

Initialise an existing OCB128&lowbar;CONTEXT for the given keys and block functions&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CRYPTO&lowbar;ocb128&lowbar;init(
    xref:OCB128_CONTEXT-0a.adoc[OCB128&lowbar;CONTEXT]* ctx,
    void* keyenc,
    void* keydec,
    xref:block128_f.adoc[block128&lowbar;f] encrypt,
    xref:block128_f.adoc[block128&lowbar;f] decrypt,
    xref:ocb128_f.adoc[ocb128&lowbar;f] stream);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Context storage to initialise&period;
| *keyenc*
| Cipher&hyphen;specific expanded key used for encryption&hyphen;direction operations&period;
| *keydec*
| Cipher&hyphen;specific expanded key used for decryption&hyphen;direction operations&period;
| *encrypt*
| Block&hyphen;encrypt function for the underlying cipher&period;
| *decrypt*
| Block&hyphen;decrypt function for the underlying cipher&period;
| *stream*
| Optional multi&hyphen;block OCB acceleration callback, or NULL&period;
|===


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