Julien ALLANOS wrote:
Actually, I have tested the following:

   EVP_CipherInit_ex(&ctx, EVP_aes_192_ecb(), NULL, key->data, NULL, 1);

if (!EVP_CipherUpdate(&ctx, ciphertext->data, (int *) &ciphertext->length,
       plaintext->data, (int) plaintext->length))
       return NULL;

   if (!EVP_CipherFinal_ex(&ctx, ciphertext->data,
                           (int *) &ciphertext->length))

here you overwrite the previously set length and data. Have a look
at the do_crypt example in the EVP_EncryptInit manpage.

OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to