EVP_PKEY_new_raw_public_key

Create an EVP_PKEY from raw public key octets for algorithms that support that form.

Synopsis

Declared in <openssl/evp.h>

EVP_PKEY*
EVP_PKEY_new_raw_public_key(
    int type,
    ENGINE* e,
    unsigned char const* pub,
    size_t len);

Return Value

New EVP_PKEY on success, or NULL on failure.

Parameters

NameDescription
typeKey type NID (for example EVP_PKEY_X25519, EVP_PKEY_ED25519, EVP_PKEY_EC).
eDeprecated ENGINE parameter; pass NULL.
pubPublic key bytes in the algorithm's raw format.
lenLength of pub in bytes.