Example code to crypt and decrypt data between PHP and JavaScript