Check the EVP_EncryptInit man page. There are some code samples at the
end of the page
http://www.openssl.org/docs/crypto/EVP_EncryptInit.html#
Just replace the cryptos in the sample code with AES128
and adjust the key length and iv length.
You can get the key length and iv length from the EVP interface.
EVP_CIPHER_key_length(EVP_get_cipherbyname("AES128"))
EVP_CIPHER_iv_length(EVP_get_cipherbyname("AES128"))
Good luck!
/leif
Lidia Fernández wrote:
Hello all!
I have to use aes128 encryption into my program to encrypt a file with
a password.
To do test, i use a "openssl enc -a -aes128 -in file.txt -out file.enc
-pass pass:12345678" command.
Now i have to find the code into openssl that does this function.
I 'm seeing in enc.c class, but it's a bit difficult because there are
a lot of code!
Somebody has do this sometimes??
Are there some utility for use aes128 into another code more easy??
PD: Sorry for my English...i know that is not good
--
Leif Thuresson Email: [EMAIL PROTECTED]
Fox Technologies Phone: +46 18 160046
Kungsangsv. 19 Cell: +46 733 630046
S-753 23 Uppsala
Sweden
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]