[#EVP_PKEY_new_raw_private_key]
= EVP&lowbar;PKEY&lowbar;new&lowbar;raw&lowbar;private&lowbar;key
:mrdocs:

Create an EVP&lowbar;PKEY from raw private&hyphen;key octets (legacy NID&sol;ENGINE form)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]*
EVP&lowbar;PKEY&lowbar;new&lowbar;raw&lowbar;private&lowbar;key(
    int type,
    xref:ENGINE.adoc[ENGINE]* e,
    unsigned char const* priv,
    size&lowbar;t len);
----

== Return Value

New EVP&lowbar;PKEY, or NULL on failure&semi; free with EVP&lowbar;PKEY&lowbar;free()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *type*
| Key type NID such as EVP&lowbar;PKEY&lowbar;X25519 or EVP&lowbar;PKEY&lowbar;ED25519&period;
| *e*
| Optional ENGINE, or NULL (ignored for provider&hyphen;only types)&period;
| *priv*
| Raw private&hyphen;key bytes in the algorithm&hyphen;native format&period;
| *len*
| Length of `priv` in bytes&period;
|===


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