title: Encrypt in python - decrypt in Javascript
body: <p>I have need to simply encrypt some text in python and being able to decrypt in JavaScrypt.</p>
  
  <p>So far I have in python:</p>
  
  <pre><code>from Crypto import Random
  from Crypto.Cipher import AES
  import base64
  
  BLOCK_SIZE = 16
  key = "1234567890123456" # want to be 16 chars
  textToEncrypt = "This is text to encrypt"
  
  def encrypt(message, passphrase):
      # passphrase MUST be 16, 24 or 32 bytes long, how can I do that ?
      IV = Random.new().read(BLOCK_SIZE)
      aes = AES.new(passphrase, AES.MODE_CFB, IV)
      return base64.b64encode(aes.encrypt(message))
  
  def decrypt(encrypted, passphrase):
      IV = Random.new().read(BLOCK_SIZE)
      aes = AES.new(passphrase, AES.MODE_CFB, IV)
      return aes.decrypt(base64.b64decode(encrypted))
  
  print encrypt( textToEncrypt, key )
  </code></pre>
  
  <p>this is producing text: <code>ZF9as5JII5TlqcB5tAd4sxPuBXd5TrgE</code></p>
  
  <p>in JavaScript:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      var decrypted = CryptoJS.AES.decrypt( "ZF9as5JII5TlqcB5tAd4sxPuBXd5TrgE", "1234567890123456");
      console.log ( decrypted.toString( CryptoJS.enc.Utf8 ) );
  &lt;/script&gt;
  </code></pre>
  
  <p>however it does not produce original string (empty string instead).
  What I am doing wrong ?</p>
  
  <p>Is it focusing on AES is a best idea - I will be happy if I have some kind of encryption that will blur data. </p>