Google Answers Logo
View Question
 
Q: JavaScript Encryption ( No Answer,   6 Comments )
Question  
Subject: JavaScript Encryption
Category: Computers > Programming
Asked by: tubedogg-ga
List Price: $3.00
Posted: 27 Aug 2003 03:46 PDT
Expires: 26 Sep 2003 03:46 PDT
Question ID: 249179
Hello,

I am looking for a program that will encrypt any JavaScript. The
encryption must be strong so that it's impossible to decrypt the code
(something like compilation of C programs). I am willing to pay for
this program, so even if it's a commercial solution I'm interested.

I would also like some information about what browsers support this
kind of encryption, etc.

Thank you,
Chen
Answer  
There is no answer at this time.

Comments  
Subject: Re: JavaScript Encryption
From: joseleon-ga on 27 Aug 2003 03:56 PDT
 
Hello, 
  As far as I know it's not possible to protect 100% the JavaScript
code, can be obfuscated to prevent normal users from reading and even
encrypted and decrypted when the user loads the page, but using
Mozilla debuggin tools you can always get the code. In any case, I'm
interested to see if there is another solution.

Regards.
Subject: Re: JavaScript Encryption
From: damiam-ga on 30 Aug 2003 09:48 PDT
 
It's impossibe to encrypt Javascript effectively. If a browser can
read it, a person can too. It can be obfuscated to a certain degree,
but real encryption is impossible.
Subject: Re: JavaScript Encryption
From: bio-ga on 30 Aug 2003 17:26 PDT
 
As a side note, even a compiled C code can be decompiled to the
assembly source code, a more-or-less human readable format.
Subject: Re: JavaScript Encryption
From: xradio-ga on 17 Sep 2003 06:58 PDT
 
Take a look at this page: http://web4w3.com/input_date.html

looks like it is protected
Subject: Re: JavaScript Encryption
From: webadept-ga on 08 Oct 2003 22:56 PDT
 
You mean those hidden files that have this function in them?

 javascript:function getDate(cel) {

Nothing is safe in Javascript. The problem lies in the fact that it is
client based, rather than server based. The browser has to be able to
"see" and "read" the javascript, otherwise, it can't do anything with
it. The Mozilla debugger, played with enough, can ferret out all the
hidden details of any javascript file. And if it can't then there are
Perl scripts which can. At some point the browswer has to be able to
see the Javascript.

It is a good setup they have there. Really, it will stop most of the
script-kiddies from stealing your code, but the reallity is, nothing
in javascript is safe from skilled eyes.

The back lash to this is, most skilled eyes aren't interested in
stealing your code anyway. Just seeing that cool little drop down
calender is enough for them to figure out how to do exactly the same
thing, or something similar.

webadept-ga
Subject: Re: JavaScript Encryption
From: firstdraft-ga on 25 Feb 2004 15:40 PST
 
Chen,

The comments here are correct as far as they go -- you can't truly
hide the code because it must be available to the client (the
webbrowser) in order for the browser to run it -- hence it is known as
"client-side scripting".

However, if you have the option of persuing other methods, you can
consider either server-side javascript, or, if the program must be in
the browser, you can write it as an active-x component.

Finally, as bio-ga stated, *anything* can be decompiled, if one is
determined enough. But novices might even have a hard time if you put
the script in its own file in its own directory, and only make it
accessible when the webpage calls it. (A moderately-informed user will
still be able to get at it).

If you're worried about people stealing and re-using your code, put a
copyright notice on it (or file a proper one) and search the web for
portions of your code (with google) now and again.

- Firstdraft

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy