Theo Orphanos
Theo Orphanos

Reputation: 1447

How to encrypt an entire php/jquery project

I have just finished the development of an application, which -apart from the online access- my client wants me to give him a backup cd for his own safety reasons.

I wouldn't mind providing such cd, but I would rather encrypt the code to protect it from unauthorized attempts of altering it, analyzing it or using it in third party applications without my knowledge.

It is important that the encrypted result will be able to operate on any server that supports php (just like the unencrypted version does now). I don't mind revealing the directory/files stucture, I just want to encrypt the php/javasctipt/html and css files content.

My speculation would be using base64 encoding for all files.

Is this a correct approach or is there any other -more reliable- suggestions?

Whatever the solution will be, the encryption must be done as a "batch job" since it is practically impossible to encrypt every single file in the project because they are too many!

Looking for local applications/solutions, since I would not like to upload my entire project to "a" website for online process.

FYI, the app is built with php/mysql/html 5, with extensive use of jquery and ajax and of course a lot of css styling. Operates on a linux centos 6.x server.

My apologies for such long question. Any help will be appreciated since I have never done anything like that before.

Upvotes: 0

Views: 976

Answers (1)

ceejayoz
ceejayoz

Reputation: 180004

It is not possible to encrypt PHP and JavaScript code in a manner that would operate on any server. There are products for PHP like http://www.zend.com/en/products/guard/ but they require stuff running on the server (and are circumventable to a determined user). JS is even harder, as it has to be sent to the user's browser for execution.

Base64 encoding would be useless - a few minutes with an experienced PHP coder and they'd figure it out.

Upvotes: 1

Related Questions