PDA

View Full Version : Encrypt HTML Programs


Matthew Treanor
04-26-2008, 10:20 PM
Hi there,

Does anyone use Encrypt HTML Programs and if so can you please suggest your favourites.

draknet
04-26-2008, 10:55 PM
Wanted to put this here, too, in case someone comes across it.

The notion of "html encryption" is a tad bit of a misnomer - html cannot be encrypted, otherwise it wouldn't work. With html (and PHP, which is also a markup language), the browser has to be able to interpret the markup it receives, so the markup has to be unencrypted at the end user's browser.

There are programs out there which can obfuscate the html. There is a cost to that, though, and you should be aware of it before using any of these programs - you can severely reduce or eliminate entirely the possibility for the page to be indexed by a search engine, you can introduce cross-browser bugs, you may have much slower load times and almost impossible maintenance. And that's not even getting into the fact that nearly all obfuscating programs can be cracked within minutes because it's not true encryption.

With html, not only there is no way to "protect" it, there is also really nothing to protect. Recreating a layout is a truly trivial endeavor, so your source code itself has very little intrinsic value.

The real value lies in the server-side scripting and page generation, and that is generally very well-protected.

Matthew Treanor
04-27-2008, 11:06 PM
I was looking at more as a way to protect photos etc.

draknet
04-27-2008, 11:16 PM
The same principle applies to both - to view pictures over the web the picture must be downloaded into the cache of the browser.

There are some tricks you can use.

You can try slicing the pictures, you can try encrypting the pictures with PTCrypt from PanoTools ( http://www.panotools.info/mediawiki/index.php?title=PTCrypt ). (To display the pictures you must use the PTViewer java applet.)

You can also have the picture reside in a table as a background image with a transparent gif in front of the real picture, and/or using htaccess to protect the image directory from direct downloads using www.yoursite.com as referrer.