lauding wrote:
Hi:
My system is centos 5.0, the openssl version is
openssl-0.9.8b-8.3.el5_0.2. which is installed by yum mod_ssl.
[snip]
AES_cbc_encrypt(szSorPlainText, szCipherText, iInputLen, &key,
szIniVec, AES_ENCRYPT);
iCipherLen = strlen(szCipherText);
Your problem lies in treating binary data as a C-string. Binary data can
have 0s in between, so don't use str*() friends on it.
Please consider using EVP_Encrypt*() functions; for documentation read
the EVP_EncryptInit() man page and the example given in it.
-jb
--
I used to think I was indecisive, but now I'm not so sure.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]