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


Reply via email to