You have to save the entire encrypted block.  cipher_final
will tell you the length of the padded and encrypted block.


So, should i assume that encrypted buffer will always be a multiple of
block_size ...
I would say that my application can't allow that though.

Why do you care at all?  Just make sure your buffer to hold
the encrypted data is at least one block_size longer than
the original text length.


When decrypting cipher_final will tell you the length of the
decrypted data.


But how can i know how many bytes long was the original buffer? (since each
one will have different lengths, but when decrypting, all will be padded up
to multiple of block size)


Because cipher_final TELLS YOU.  The length it returns is the
length of the original text.  It doesn't do any padding on
decryption.

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

Reply via email to