Chris Veness has ported his JavaScript AES implementation to PHP code. I wrapped the whole thing into a class for easier use.
Download it here: aes.class.phps (14.54 KiB, 50 downloads)
<?php require_once('aes.class.php'); $text = 'Hello, world!'; $password = 'itsmysecret'; $blocksize = 256; // can be 128, 192 or 256 $crypted = AES::encrypt( $text, $password, $blocksize ); // do something ... $decrypted = AES::decrypt( $crypted, $password, $blocksize ); ?>