Page 1 of 1

Encrypting a file.

Posted: Tue Feb 17, 2009 11:05 pm
by ClarenceC
Can anyone advise me how to encrypt a file. File possibilities will be excel, word or just .txt files. I have a site where users can upload files through an upload form, and I can download them from the admin section. What I can't figure out is how to encrypt the actual file so that while it sits in its folder on the server, if someone gets a hold of it, it will be encrypted. Then when I download it, it should decrypts itself so when I get it, it is usable again. Any ideas?

Re: Encrypting a file.

Posted: Wed Feb 18, 2009 1:25 pm
by kaisellgren
How about uploading the files outside the document root? Therefore the files are only accessible through your application. If you happen to have a vulnerability allowing someone to read those files, then your encryption/decryption would also be compromised, so, I do not think it is a necessity to encrypt the files.

What kind of information do those files consist of?