How does the decryption work?

This generator creates a html file with the encrypted content of the input in it (the ciphertext). Passwords are (obviously) not stored in the html file. The page asks the user to input his/her password, and after the user has entered the password the decryption process begins. I'm not going to explain how this all works, but what you need to know is that using AES a page can decrypt a ciphertext, the encrypted version of the original html, to the decrypted text with the password. For more documentation about how this all works, I recommend reading more about AES. After the ciphertext has been decrypted, the original html is displayed on the page, using a full page iframe. This way there are no syntax-errors (unless in the original html itself), and the user can just browse like it would browse on a normal page.

How does the generating work?

The generator just creates the protected document, by encrypting, thus generating the ciphertext from the password and the original html. The ciphertext will be included in the protected html-page. After the ciphertext is included in an existing template, the generator lets the user choose their output method. If you look in the source code you will see how they work.

Note: If you want to see the un-minified/compiled version of a source-code, just prepend .max before the extension, so for example instead of style.css style.max.css. This will probably not work with the scripts from third-party libraries used by me. (ckeditor and ACE)
Note 2: Everything in this webapp is written in html/css/javascript, no server-side scripting!