Encryption schemes (or encoders) try to hide your code as an encrypted file. Obviously, the code must be decrypted at runtime, which adds extra overhead. Some of them also insist that the host system sets up special procedures that hosters strongly dislike, because they do not want to configure special configurations just for you. But the bad part is that they contain the seeds of their own destruction: to run on the target host, they must contain decryption software. Therefore, if you use one, you deliver the most decoder needed to get the code. The only thing to find; after detection, your code is fully decrypted and displayed. They are simply not safe.
Obfuscation schemes scramble identifier names, delete comments and formatting. But the confusing code works exactly like the original, without any overhead, and no special support at run time is required. Obfuscators depend on the inherent difficulty in understanding programs in general. Programs are complex enough to understand when they are well designed, the names are well chosen, and there are good comments in the code. We all hope that our programs are well designed, but if the names are bad and the comments are gone, they are pretty hard to understand. Learn your own experience with other people's code.
People will say: "But someone can check the confusing code and understand it." This is true if you have a tiny application. If your application has any scale (tens of pages of code), it is very difficult to understand what it does when all variable names are scrambled. The larger your code, the better obfuscation protects it.
If you want to see examples of what a single PHP obfuscator does, see our Thicket PHP Obfuscator .
Ira Baxter
source share