On Thu, Apr 1, 2010 at 3:47 PM, Paul M Foster <paulf@xxxxxxxxxxxxxxxxx> wrote: > Folks: > > If I wanted to encrypt a file in PHP and then write it out to disk > (one-way encryption, requiring a password), what PHP built-ins might you > recommend to encrypt the contents of the file before writing it out to > disk? > > Paul > I use the MCrypt extension to encrypt strings (login hashes in cookies, other such things). I don't see why you couldn't read the file into a string and then use mcrypt. You'd have to play with it though. Like make sure performance doesn't degrade massively for large files (rather than small strings), as well as making sure everything is binary-safe. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php