-2

Is it possible to encrypt a PHP code file without installing php.in extensions?

I have a script of 5 php file and I want to create a copy to give away with the code protected. So they can access the script from the front-end but the back-end (code) is encrypted. I have found alot of software that allow encryption of php be but they all require installation of php.in extensions.

Is there anything embedded into Php 5.5 that would work similar to MD5 password encryption?

Artjom B.
  • 61,146
  • 24
  • 125
  • 222
Mohamed Mahyoub
  • 381
  • 2
  • 18
  • If PHP can interpret your code to execute it, *so can anybody else*. It's just a matter of how readable the code is (anywhere between plaintext and byte code). – deceze Feb 22 '16 at 13:14
  • 1
    MD5 is not encryption, it is a one-way hash function. Please do a little research. – zaph Feb 22 '16 at 13:57

2 Answers2

1

No because MD5 is a one-way hash, you can't reverse the string. The reasons these extensions exist are so that the code can be encrypted and decrypted so that PHP can execute it.

You might want to look at a similar question here: Best solution to protect PHP code without encryption

Community
  • 1
  • 1
fire
  • 21,383
  • 17
  • 79
  • 114
  • 1
    md5 encryption has been popular for so many years, I gave up on explaining what's the difference between hashing and encryption ;-) – maxhb Feb 22 '16 at 13:09
1

Is there anything embedded into Php 5.5 that would work similar to MD5 password encryption?

Simple answer: No.

Every encoder I have seen (e.g. http://www.ioncube.com/) uses some kind of php extension so your code will need a special enviroment to be executable.

There are some so called obfuscators (e.g. http://www.gaijin.at/olsphpobfuscator.php is free) out there that will not encrypt your code but rename variables and functions/methods so that your code will become much harder to read.

One thing to keep in mind is that debugging errors of encrypted/obfuscated code usually is much harder, even for the developer.

maxhb
  • 8,554
  • 9
  • 29
  • 53