Initialize a seal (envelope encrypt) operation for npubk recipients.

Synopsis

Declared in <openssl/evp.h>

int
EVP_SealInit(
    EVP_CIPHER_CTX* ctx,
    EVP_CIPHER const* type,
    unsigned char** ek,
    int* ekl,
    unsigned char* iv,
    EVP_PKEY** pubk,
    int npubk);

Return Value

Number of recipients successfully processed, or 0 on failure.

Parameters

Name

Description

ctx

Cipher context that will encrypt the content with a generated session key.

type

Symmetric cipher used for the content.

ek

Array of buffers receiving per‐recipient encrypted session keys.

ekl

Array receiving the encrypted‐key lengths written to ek.

iv

Buffer receiving the generated IV (sized for type), or NULL if unused.

pubk

Array of recipient public keys used to wrap the session key.

npubk

Number of entries in pubk / ek / ekl.

Created with MrDocs