[#OSSL_HPKE_export]
= OSSL&lowbar;HPKE&lowbar;export
:mrdocs:

Derive an exporter secret from an established HPKE context (after encap&sol;decap)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
OSSL&lowbar;HPKE&lowbar;export(
    xref:OSSL_HPKE_CTX.adoc[OSSL&lowbar;HPKE&lowbar;CTX]* ctx,
    unsigned char* secret,
    size&lowbar;t secretlen,
    unsigned char const* label,
    size&lowbar;t labellen);
----

== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| HPKE context with derived secrets&period;
| *secret*
| Destination buffer for the exported secret&period;
| *secretlen*
| Desired export length in bytes&period;
| *label*
| Application&hyphen;supplied exporter context label&period;
| *labellen*
| Length of `label` in bytes&period;
|===


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