[#EVP_SealInit]
= EVP&lowbar;SealInit
:mrdocs:

Initialize a seal (envelope encrypt) operation for `npubk` recipients&period;

== Synopsis

Declared in `&lt;openssl&sol;evp&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
EVP&lowbar;SealInit(
    xref:EVP_CIPHER_CTX.adoc[EVP&lowbar;CIPHER&lowbar;CTX]* ctx,
    xref:EVP_CIPHER-07.adoc[EVP&lowbar;CIPHER] const* type,
    unsigned char** ek,
    int* ekl,
    unsigned char* iv,
    xref:EVP_PKEY.adoc[EVP&lowbar;PKEY]** pubk,
    int npubk);
----

== Return Value

Number of recipients successfully processed, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| Cipher context that will encrypt the content with a generated session key&period;
| *type*
| Symmetric cipher used for the content&period;
| *ek*
| Array of buffers receiving per&hyphen;recipient encrypted session keys&period;
| *ekl*
| Array receiving the encrypted&hyphen;key lengths written to `ek&period;`
| *iv*
| Buffer receiving the generated IV (sized for `type),` or NULL if unused&period;
| *pubk*
| Array of recipient public keys used to wrap the session key&period;
| *npubk*
| Number of entries in `pubk` &sol; `ek` &sol; `ekl&period;`
|===


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