Is it possible to encrypt/password-protect a Phar archive to enable closed-source software distribution?
Phar supports zip, and zip files can be password-protected. But you would need a monkey for typing in the zip password whenever a request comes in. So 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): failed to open stream: phar error: Cannot process encrypted zip files in zip-based phar "phar.zip" in php shell code on line 1
Wanting to have a company purchase closed-source software,
In that case, phar alone will not help you. Look for a bytecode compiler like ioncube.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With