Hi, thanks for your answer. I didn't call them all times, just first time. The fact is that I would like to use 'cbc' scheme, so I Could make this way, if re call EncryptInit will delete the state of the context :
Take a random IV, and use it. Encrypt a message, and save last cipher-text ( Let be C). Re-call EncryptInit using C as IV. Otherwise I could never call EVP_EncryptInit_final and just use EVP_Encrypt_update , making padding with a function implemented by my self. I'm waiting for further details and support. Many thanks . Best Regards > Are you calling EVP_EncryptInit_ex / EVP_DecryptInit_ex for each > message? If you reuse a context for multiple messages you still need > to call these functions before any calls to > EVP_EncryptUpdate/EVP_DecryptUpdate. > > Matt > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager majord...@openssl.org