[EMAIL PROTECTED] wrote:
> 
> Hi. I've tried in this way too, but still doesn't run correctly.
> Here is the code:
> 

The EVP functions write to the buffer you give them and return the
number of bytes actually written. 

As a result if you keep passing the same buffer pointer all the time old
encrypted data will be overwritten.

This doesn't matter if you are writing the encrypted data after each
call but if want the entire encrypted data in the buffer then you need
to update the pointer passed to EVP_*() so it points after the data just
written.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.

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

Reply via email to