Re: File encryption under PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux