Print Page | Close Window

How to encrypt JS script document (*.js)

Printed From: Foxit's Planet PDF Forum
Category: Lets Talk PDF
Forum Name: JavaScript
Forum Description: Discussions relating to the use of JavaScript within PDF.
URL: http://forums.planetpdf.com/forum_posts.asp?TID=46
Printed Date: 12 Nov 2019 at 11:34am
Software Version: Web Wiz Forums 11.10 - http://www.webwizforums.com


Topic: How to encrypt JS script document (*.js)
Posted By: oald
Subject: How to encrypt JS script document (*.js)
Date Posted: 29 Sep 2011 at 12:25pm
I create a folder level JavaScipipt and save it as config.js, I wonder how I can encrypt the file so that the users don't have access to the source codes.
 
Your answers and suggestions are really appreciated!



Replies:
Posted By: aandi
Date Posted: 29 Sep 2011 at 3:44pm
In theory you could have an encrypted file, but you would also need a plaintext file which contained the keys and JavaScript for decrypting it.  In short, while you can obfuscate, you can't usefully encrypt - as far as I can see.

In this respect it's like anything (JavaScript, HTML, CSS) used on a web site.


Posted By: BAlheit
Date Posted: 29 Sep 2011 at 4:18pm
You can try this:
http://javascriptobfuscator.com/default.aspx - http://javascriptobfuscator.com/default.aspx



Posted By: oald
Date Posted: 30 Sep 2011 at 12:26pm

Hi aandi and BAlheit,

Thanks for your answers, I will have a try! Hope they work! :)


Posted By: oald
Date Posted: 30 Sep 2011 at 12:30pm
I have a try in JavaScript debugger, yes, the obfuscated codes works! Thanks so much for sharin this!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.10 - http://www.webwizforums.com
Copyright ©2001-2017 Web Wiz Ltd. - https://www.webwiz.net