[#EVP_PKEY_todata]
= EVP&lowbar;PKEY&lowbar;todata
:mrdocs:

Export selected key components from an EVP&lowbar;PKEY as a newly allocated OSSL&lowbar;PARAM array&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;PKEY&lowbar;todata(
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY] const* pkey,
    int selection,
    xref:OSSL_PARAM.adoc[OSSL&lowbar;PARAM]** params);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pkey*
| Provider&hyphen;backed key to export&period;
| *selection*
| OSSL&lowbar;KEYMGMT&lowbar;SELECT&lowbar;&ast; mask describing which parts to export&period;
| *params*
| Receives a newly allocated parameter array&semi; free with OSSL&lowbar;PARAM&lowbar;free()&period;
|===


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