Re: File encryption under PHP
| From: | Ashley Sheridan | Date: | Thu, 01 Apr 2010 19:45:53 +0000 |
| Subject: | Re: File encryption under PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-303734@lists.php.net to get a copy of this message | ||
On Thu, 2010-04-01 at 15:47 -0400, Paul M Foster 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
>
> --
> Paul M. Foster
>
I don't think you want one-way encryption, that would mean you can't
unencrypt it!
What about the usual functions for encrypting strings in PHP? Couldn't
you encrypt the file as a string and output that? Or did you want the
file to request a password when it was opened? What about a
password-protected compressed archive file?
Thanks,
Ash
http://www.ashleysheridan.co.uk