[#OSSL_ENCODER_CTX_new_for_pkey] = OSSL_ENCODER_CTX_new_for_pkey :mrdocs: Create an encoder context preconfigured to encode an EVP_PKEY. == Synopsis Declared in `<openssl/encoder.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:OSSL_ENCODER_CTX.adoc[OSSL_ENCODER_CTX]* OSSL_ENCODER_CTX_new_for_pkey( xref:EVP_PKEY.adoc[EVP_PKEY] const* pkey, int selection, char const* output_type, char const* output_struct, char const* propquery); ---- == Description Performs an implicit encoder fetch suitable for `pkey,` which is more useful than calling OSSL_ENCODER_CTX_new() alone. The returned context may have zero encoders if none matched; check with OSSL_ENCODER_CTX_get_num_encoders(). == Return Value New encoder context, or NULL on error; free with OSSL_ENCODER_CTX_free(). == Parameters [cols="1,4"] |=== | Name| Description | *pkey* | Assigned public or private key to encode. | *selection* | OSSL_KEYMGMT_SELECT_* mask for components to encode. | *output_type* | Desired ending output type (for example "DER" or "PEM"). | *output_struct* | Desired output structure name (for example "pkcs8"), or NULL. | *propquery* | Optional property query for encoder fetching, or NULL. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#