#include
int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek, int ekl,unsigned char *iv,EVP_PKEY *priv); int EVP_OpenUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, unsigned char *in, int inl); int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
_E_V_P___O_p_e_n_I_n_i_t_(_) initializes a cipher context ccttxx for decryption with cipher ttyyppee. It decrypts the encrypted symmetric key of length eekkll bytes passed in the eekk parameter using the private key pprriivv. The IV is supplied in the iivv parameter.
_E_V_P___O_p_e_n_U_p_d_a_t_e_(_) and _E_V_P___O_p_e_n_F_i_n_a_l_(_) have exactly the same properties as the _E_V_P___D_e_c_r_y_p_t_U_p_d_a_t_e_(_) and _E_V_P___D_e_c_r_y_p_t_F_i_n_a_l_(_) routines, as documented on the _E_V_P___E_n_c_r_y_p_t_I_n_i_t(3) manual page.
If the cipher passed in the ttyyppee parameter is a variable length cipher then the key length will be set to the value of the recovered key length. If the cipher is a fixed length cipher then the recovered key length must match the fixed cipher length.
_E_V_P___O_p_e_n_U_p_d_a_t_e_(_) returns 1 for success or 0 for failure.
_E_V_P___O_p_e_n_F_i_n_a_l_(_) returns 0 if the decrypt failed or 1 for success.