JavaScript HTML XOR Encrypter Version 1.2

This Javascript will encrypt and decrypt pasted text with the XOR algorithim. Simply enter the desired password, paste the information, choose Encrypt or Decrypt and press the button at the bottom of the page. Your computer will encrypt the information and put the encrypted data back into the Data text box, ready to be copied. Simply click Edit then Copy and your encrypted text is ready to be pasted somewhere else. If there are any errors please email me.

This algorithim can be used to password protect a page. Try out my demonstration of a JavaScript password protected page. The password is "PASSWORD". Just a warning, it is slow. It takes about 5-60 seconds, depending on the browser and the processor. If you would like use my JavaScript to password protect a page, scroll down to the bottom and follow the directions. If you use my script to encrypt a web page, please let me know. Thanks.

Password: Encrypt
Decrypt
Data:

How to use the JavaScript Encrypter to password protect a web page

  1. Download the xorcrypt12.js file
  2. Encrypt your web page using the encoder above
  3. Use the following syntax, following the directions in caps

    <HTML>
    <HEAD>
    <SCRIPT LANGUAGE="JavaScript" SRC="xorcrypt12.js">
    alert ("Error loading xorcrypt12.js!");
    </SCRIPT>
    <SCRIPT LANGUAGE="JavaScript">
    
    function process() {
    var password="";
    var contents="PASTE YOUR ENCRYPTED HTML BETWEEN THE QUOTES";
    
    password=prompt("Enter the password to decode this document", "");
    if (password!=null)
    	{
    	document.write(decrypt(contents, password));
    	document.close();
    	}
    }
    </SCRIPT>
    </HEAD>
    <BODY onLoad="process()">
    </BODY>
    </HTML>
    

  4. Save it as a new HTML file