title: AES in JavaScript that matches PHP's mcrypt
body: <p>Is there any JavaScript libs that lets you encrypt and decrypt 256 bit AES the way you do it with mcrypt in PHP (and get the same result of course)? I want to give it a variable-length message and a 32 chars key. All libs I find wants fixed-length blocks of cleartext and byte-arrays of keys.</p>
  
  <p>This is how it's done in PHP:</p>
  
  <pre><code>$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
  $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
  echo mcrypt_encrypt(MCRYPT_RIJNDAEL_256, "32 CHARS THAT REPRESENT MY KEY!!", "hello", MCRYPT_MODE_ECB, $iv);    
  </code></pre>