1

is there any server side language like PHP that could open password protected files like zipped files? newest PHP version is supporting set password when you want to create a password protected zip file, but I could not find any way to open password protected files in PHP.

I want to save my files in a secure and password protected directory without any access even from host admin. I thought maybe it's the best way to save my files in a password protected zip file but maybe you had any other better suggestion. if yes, can you please give me a clue?

Thanks

Reza Amya
  • 89
  • 1
  • 10
  • Duplicate of [How can I extract a password protected .zip file from within my PHP application?](http://stackoverflow.com/questions/5654115/how-can-i-extract-a-password-protected-zip-file-from-within-my-php-application) -- See the comments on the answer, too. –  Jun 14 '14 at 14:06
  • this is not a duplicated question. because that way is not Using "Server Side Languages" and here I want to find a way to using server side languages directly – Reza Amya Jun 16 '14 at 09:35

1 Answers1

0

If you don't trust the admin of the server, you should not encrypt your data on the server.

In order to do any encryption on the server, you need to either store the key on the server or at least transmit it when you encrypt or decrypt the files. The admin of the server is then able to get access to the key.

The only way to securely store data on an untrusted server is to do the encryption and decryption on your local machine and only upload the encrypted container.

Beat
  • 1,337
  • 15
  • 30
  • In newest version of PHP we can set pssword for zipped files but I don't know there is any way to add file to password protected zipped files or not. and also I don't know how we can use password protected zipped files like none-password protected zipped files in PHP encryption and decryption is good way, but I need a way to decryption on server side. and also it could be hidden from server admin accessibility. – Reza Amya Jun 16 '14 at 09:38