I am using php to connect to oracle database, php function to connect to oracle database is
oci_connect("user","password","database");
to make connection string more secure, i store connection string in php string variable and i have encrypted whole php string using openssl_encrypt method aes-128-cbc.
at the run time i am decrypting my encrypted string, encryption and decryption part is working ok, when i am decrypting string at run time i am getting proper decrypted value
$dec_conn_string = openssl_decrypt($encrypted_conn_string,"aes-128-cbc", $keys, $options=0, $iv);
so it is like
$dec_conn_string = oci_connect("user","password","database");
but $dec_conn_string is not having expected value e.g FALSE or connection identifier and connection to database is not happening, when i echo php variable $dec_conn_string it displays oci_connect("user","password","database").
eval()
to run that code. But as was said it is a bad design, use proper documented security, consider connection using Oracle Wallet – astentx