[#OSSL_ENCODER_to_data] = OSSL_ENCODER_to_data :mrdocs: Run encoding for a context and write the result into a memory buffer. == Synopsis Declared in `<openssl/encoder.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int OSSL_ENCODER_to_data( xref:OSSL_ENCODER_CTX.adoc[OSSL_ENCODER_CTX]* ctx, unsigned char** pdata, size_t* pdata_len); ---- == Return Value 1 on success, or 0 on failure (including when a caller‐supplied buffer is too small). == Parameters [cols="1,4"] |=== | Name| Description | *ctx* | Configured encoder context. | *pdata* | Address of an output buffer pointer; if *`pdata` is NULL, a buffer is allocated with OPENSSL_malloc() and ownership transfers to the caller. If non‐NULL, *`pdata` must point to a buffer of size *`pdata_len.` | *pdata_len* | On input, capacity of *`pdata` when non‐NULL; on success, length of encoded data. Required (must not be NULL). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#