I have managed to encrypt / decrypt data to one file using bio methods, however is it possible to encrypt to different files using the same bio cipher? for example something like this:
BIO *file = BIO_new_file("out.bin", "w"); BIO *buffer = BIO_new(BIO_f_buffer()); BIO *cipher = BIO_new(BIO_f_cipher()); BIO *file2 = BIO_new_file("out-2.bin", "w"); BIO_push(cipher, buffer); BIO_push(buffer, file); BIO_set_cipher(cipher, EVP_rc4(), key, NULL, 1); BIO_write(cipher, data1, data1size); BIO_flush(cipher); BIO_reset(buffer); BIO_pop(file); BIO_push(buffer, file2); BIO_write(cipher, data2, data2size); BIO_flush(cipher); the data of file2 gets corrupted, am I missing something? ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]