3

Hi am new to bcompiler and my purpose is to encrypt the PHP code in production site, for security. So my doubt is, whether decryption is possible if some one takes the encrypted code of bcompiler? Also is this a better method to encrypt a PHP code or any other solution? Suggestions please.

Thanks

V-T
  • 756
  • 2
  • 9
  • 22
  • Duplicate: http://stackoverflow.com/questions/10200584/how-safe-is-php-bcompiler-encoded-code/20175099#20175099 – user956584 Mar 03 '15 at 09:38

2 Answers2

3

bcompiler encodes your source into bytecode. It does not encrypt your code.

It does increase the performance of your code, as PHP processes raw source into bytecode before execution anyway.

No one will be able to decode the bytecode back to your code.

See the answers to this question which provide links to other tools which may be an extension to bcompiler.

Also, as this answer suggests:

It is just as safe as compiling C++ to ASM. It CAN be reverse engineered or understood by careful reading and logic, ...

I tried the "bcompiler decoder", linked to in this answer. When bcompiling a class, then decompiling it with the "bcompiler decoder", a set of human readable instructions are created. It did not reproduce a class with the same behavior as the source/bcompile'd version (which would've been pretty impressive).

Community
  • 1
  • 1
mstrthealias
  • 2,781
  • 2
  • 22
  • 18
2

my purpose is to encrypt the PHP code in production site, for security

I suggest finding a new purpose. Encrypting your source code offers little security of anything. It is always possible to decompile your application in some form (even if an ugly form). Otherwise, it wouldn't run.

This is true of every piece of software ever written. You will not find some sort of magical perfect encryption, and I highly doubt that your scenario is much different than every other commercially released piece of software ever created.

The fix for this isn't technical. Have someone with legal knowledge draft a good licensing agreement, and enforce it if/when you have to. You might also consider providing a hosted solution if your code contains some sort of secret that cannot be revealed.

Brad
  • 159,648
  • 54
  • 349
  • 530