| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|Help: encryption/decryption via PHP|
keep sensitive files encrypted and decrypt for download.
Here's what I have:
Upload a file via HTTP to my server
User request file, decrypt it.
I don't want to have to decrypt, then download.
Is there some way to encrypt the file so that it can be decrypted as downloaded?
I really don't know, in fact, I'm not sure if I can explain correctly what I want! :)
My server is OpenBSD 3.0 and PHP 4.0.6
As with any built-in encryption, there really is no way you can decrypt ..
So, the solution would have to be creating your own encryption algorithm .. which in this case is pointless anyway.
May I suggest two alternative solutions?
1) When the file is uploaded it will be placed in a directory that is not accessible through the browser .. meaning, the file would have to be downloaded using your PHP script.
2) When the file is uploaded its contents will be read and placed in a database (depending on file size). When the user requests the file its contents are fetched from the database.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved