[#OSSL_HPKE_CTX_new]
= OSSL&lowbar;HPKE&lowbar;CTX&lowbar;new
:mrdocs:

Create an HPKE context for the given mode, suite, and sender&sol;receiver role&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:OSSL_HPKE_CTX.adoc[OSSL&lowbar;HPKE&lowbar;CTX]*
OSSL&lowbar;HPKE&lowbar;CTX&lowbar;new(
    int mode,
    OSSL&lowbar;HPKE&lowbar;SUITE suite,
    int role,
    xref:OSSL_LIB_CTX.adoc[OSSL&lowbar;LIB&lowbar;CTX]* libctx,
    char const* propq);
----

== Return Value

New context, or NULL on error&semi; free with OSSL&lowbar;HPKE&lowbar;CTX&lowbar;free()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *mode*
| HPKE mode (OSSL&lowbar;HPKE&lowbar;MODE&lowbar;BASE, PSK, AUTH, or PSKAUTH)&period;
| *suite*
| KEM&sol;KDF&sol;AEAD suite identifiers&period;
| *role*
| OSSL&lowbar;HPKE&lowbar;ROLE&lowbar;SENDER or OSSL&lowbar;HPKE&lowbar;ROLE&lowbar;RECEIVER&period;
| *libctx*
| Library context for algorithm fetches, or NULL for the default&period;
| *propq*
| Optional property query string, or NULL&period;
|===


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