JavaScript that will encode and decode html content.
Should have option for simple password and also other factors all the way up to public private key.
Good starting point - http://www.fourmilab.ch/javascrypt/javascrypt.html