Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Javascript How to encrypt JavaScript?

Related Tutorials


 
 

Share on Google+Share on Google+

How to encrypt JavaScript?

Advertisement
Learn How to encrypt JavaScript and protect your code.

How to encrypt JavaScript? Tutorial on Obfuscator tool of JavaScript

In this section I will tell you about a tool for encrypting the JavaScript.

If don't want your code to be readable the you can use the JavaScript Encryption library to encrypt the JavaScript.

For this you can use the Javascript Obfuscator tool. The Javascript Obfuscator tool will convert your code into non readable format. After the conversion your JavaScript will work perfectly but no one can read the source code.

Here is one example of JavaScript:

var a="Hello World!";
function MsgBox(msg)
{
alert(msg+"\n"+a);
}
MsgBox("OK");

After running the Javascript Obfuscator tool the code will be changed to:

var _0x2cc9=["\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x21","\x0A","\x4F\x4B"];var a=_0x2cc9[0];function MsgBox(_0x276bx3){alert(_0x276bx3+_0x2cc9[1]+a);} ;MsgBox(_0x2cc9[2]);

Which is completely not readable.

Check the tool at http://www.javascriptobfuscator.com/

More JavaScript Tutorials:

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 12, 2013

Related Tutorials

Discuss: How to encrypt JavaScript?  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com