[#EVP_PKEY_new_raw_public_key]
= EVP&lowbar;PKEY&lowbar;new&lowbar;raw&lowbar;public&lowbar;key
:mrdocs:

Create an EVP&lowbar;PKEY from raw public key octets for algorithms that support that 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;public&lowbar;key(
    int type,
    xref:ENGINE.adoc[ENGINE]* e,
    unsigned char const* pub,
    size&lowbar;t len);
----

== Return Value

New EVP&lowbar;PKEY on success, or NULL on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *type*
| Key type NID (for example EVP&lowbar;PKEY&lowbar;X25519, EVP&lowbar;PKEY&lowbar;ED25519, EVP&lowbar;PKEY&lowbar;EC)&period;
| *e*
| Deprecated ENGINE parameter&semi; pass NULL&period;
| *pub*
| Public key bytes in the algorithm&apos;s raw format&period;
| *len*
| Length of `pub` in bytes&period;
|===


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