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.
Printed Date: 12 Nov 2019 at 11:34am
Software Version: Web Wiz Forums 11.10 -

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!

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: -

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 -
Copyright ©2001-2017 Web Wiz Ltd. -