So I'm trying to encrypt and echo a file with openssl. Getting my file contents works, but after I call the function to encrypt, it doesn't echo anything, as if it were a syntax error.
$file = file_get_contents($filename);
//echo $file; // works
$encfile = openssl_encrypt($file, $encmethod, $enckey, 0, $iv);
echo $encfile;
Yes, all my encryption keys and everything are valid. Echoing anything after the encryption doesn't work. If anyone knows what's wrong please let me know.
$encmethod, and$iv. Also, what is the byte length of$enckey? Also as requested, check your error log.$encmethod = "AES-256-CBC";$iv is 16 bytes $enckey is 32 and theyre based off of time and worked fine with a smaller file previously.