On Wed, Nov 28, 2007, Lidia Fernndez wrote:

> Hello all!
>
> I have created a c file where i encrypt with aes128, and is all good!! I 
> have create a mini-code that do the same that the command:
>
>        "openssl enc -a -aes128 -in file.txt -out file.enc -pass 
> pass:12345678"
>
> In my code, i have a file that contents the data and i create a BIO:
>
> filename = "path_to_file";
> BIO *in = NULL;
> in=BIO_new(BIO_s_file());
> BIO_read_filename(in,filename);
>
> Now I need to change all to create a BIO * from a char []
>
> I have all data that i have to encrypt in a char[9500] (in a buffer) and i 
> don't know how create a BIO from buffer.
>

BIO_new_mem_buf() see the BIO_s_mem() manual page for details.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to