This is a quick example of how to get symmetric encryption in JS using [aes.js from the crypto-js project][1]:
// at this point http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js should be loaded
var data = 'a JSON blob or something',
password = 'my long and very secretive passphrase';
var encrypted = CryptoJS.AES.encrypt(data, password).toString();