PHP Phar Encryption

Can I encrypt / password protect my Phar archive to enable the distribution of closed source software?

+7
source share
2 answers

Phar supports zip, and zip files can be password protected. But you will need a monkey to enter the zip password whenever the request comes. Therefore, no, not useful for closed source software.

But to make this a somewhat serious answer, no, it really doesn't work:

PHP Warning: include (phar: //phar.zip): stream could not be opened: phar error: Cannot process encrypted zip files in zip-phar phar phar.zip in php shell code in line 1

+5
source

Desiring to purchase closed source software for the company,

In this case, phar will not help you. Find a bytecode compiler like ioncube.

+2
source

All Articles