[#EVP_PKEY_encapsulate] = EVP_PKEY_encapsulate :mrdocs: Perform key encapsulation: produce a wrapped key and a shared secret. == Synopsis Declared in `<openssl/evp.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int EVP_PKEY_encapsulate( xref:EVP_PKEY_CTX.adoc[EVP_PKEY_CTX]* ctx, unsigned char* wrappedkey, size_t* wrappedkeylen, unsigned char* genkey, size_t* genkeylen); ---- == Return Value 1 on success, or a non‐positive value on failure. == Parameters [cols="1,4"] |=== | Name| Description | *ctx* | Context previously initialized with EVP_PKEY_encapsulate_init(). | *wrappedkey* | Buffer receiving the encapsulated key, or NULL to query lengths. | *wrappedkeylen* | In/out length of `wrappedkey.` | *genkey* | Buffer receiving the generated shared secret, or NULL to query lengths. | *genkeylen* | In/out length of `genkey.` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#