Monday, June 07, 2004

It is not just .Net you can obfuscate...

It is amazing how panicked some customers will get when you tell them that their new application will have code on the client-side of a browser (using tiny words, so they understand the implications of that).

We are just rolling off of a 6 month development project for "savings calculators", to be used by the sales staff. The functional requirements forced some calculations to be performed on the client-side. Now the customer is upset that their business rules are exposed as JavaScript, "some competitor could steal our logic..." Believe me, I saw that logic, there is nothing there to steal!

Anyway, we were able to assuage some of their fears by using a little mentioned feature for applications using the Microsoft Scripting Runtime 5.0 or better. The Microsoft Script Encoder seems to be a nice way of obfuscating (though not encrypting JavaScript) that you need to send to the client. Not good for passwords or anything. But, fairly effective at deterring theft or modification of script.

Microsoft Script Encoder can be downloaded here.

The interesting thing is that this utility is simply a wrapper around the Scripting.Encoder COM object which can be invoked directly (See the attached link in this post). Which is good if you are spitting out dynamic script fragments from ASP or ASP.Net code.

1 comments:

Menino said...

well,
i work with java, but im not a microsoft (M$) enemy, -ehehe- and i dont use to ofuscate my code, but I'm me.

have a nice day.
;)