Client wants backups to be encrypted with AES-256. PHP 5.3.0 and above can do that with its openssl functions, but only for strings, not files, and it seems impractical to load up a string that is always huge and can be arbitrarily large. So I guess I’ll have it (backup.php) optionally exec openssl externally, unless someone has a better idea? Obviously this requires having the openssl utility installed.
Thought I’d bring this up before submitting code for review.
Here’s one easy and flexible way to do it. Make a global parameter that is itself the encryption command to be EXEC’d, key and all. If you choose encryption, backup.php would run it through sprintf() to plug in its temporary file names, and then exec(). A sample parameter: