vivmal
vivmal

Reputation: 317

JavaScript to encrypt-decrypt html files

I have a folder containing thousand of html files. I want initially all these html files should be in encryted form and when a call to paticuler html is made, it should be decryted and should open in browser and after that when next html will be called the previously decrypted html should be deleted or again encrypted. Can ww do that and how? And also tell me JavaScript code to encrypt - decrypt html.

Thanks in advance.

Upvotes: 0

Views: 2867

Answers (2)

cgp
cgp

Reputation: 41381

I'm not sure what you're trying to accomplish, but here's the library you are looking for:

Descrypt the HTML from the server as encoded...

Then slap in the HTML with jQuery using the $ function. Note that this will be utterly insecure as the key/password will be passed or revealed somewhere in the browser or even the HTML at some point.

Upvotes: 2

Bjorn
Bjorn

Reputation: 71830

There's no need to use JavaScript to encrypt or decrypt, use HTTPS and a certificate.

Upvotes: 3

Related Questions