Hi all.

I'm developing a simple software that gets input from stdin and send
it (after encrypting) to a server.

Since, i don't know if text from user is multiple of 8 byte( i'm using des),
in my encryption function I always call:
EVP_EncryptUpdate

and then:
EVP_EncryptFinal_ex

All works fine but only for first message.

For example if I send as first message:
"12345678" that are 8 bytes, and as second message:
"hello".
My server will print:
"0x08 0x08 0x08 0x08 0x08 0x08 0x08 0x08 Hello".

0x08 8 times is the padding that on client side EVP_EncryptFinal_ex added.

How can I make to avoid that padding in second message?

Have I to call clean_up all times?

Thanks

Bye
                                          

Reply via email to