Douglas Laing wrote:
I copied the do_crypt routine (General encryption, decryption function example using FILE I/O and RC2 with an 80 bit key) from the EVP_EncryptInit(3) man page and used it to encrypt a 433282 byte file. Function EVP_CipherFinal_ex fails and ERR_get_error returns `error:0606506D:lib(6):func(101):reason(109)', i.e. WRONG FINAL BLOCK LENGTH. ctx.buf_len has a value of 2. I thought EVP_CipherFinal_ex would pad the extra bytes and encrypt them.

as only EVP_DecryptFinal_ex can give the EVP_R_WRONG_FINAL_BLOCK_LENGTH error message I guess you are trying to decrypt the message and hence the error

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

Reply via email to