title: AES implementation on Python, Windows
body: <p>I've experienced some trouble encrypting and decrypting data between the server and client application I'm developing. I'm using AES implementation using a script that can be downloaded  <a href="http://wiki.birth-online.de/snippets/python/aes-rijndael" rel="nofollow">here at birth-online.de</a>.</p>
  
  <p>The implementation is working just fine when I'm trying to encode or decode data on my Ubuntu 10.04 Server. However, when trying to use the script under Windows I'm getting the following Exception thrown at me:</p>
  
  <pre><code>&gt;&gt;&gt; aes.encrypt("Test", "Test", 256)
  
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "aes.py", line 148, in encrypt
      key = Cipher(pwBytes, KeyExpansion(pwBytes))
    File "aes.py", line 112, in KeyExpansion
      w = [0] * Nb*(Nr+1)
  TypeError: can't multiply sequence by non-int of type 'float'
  </code></pre>
  
  <p>Does anyone know what's going wrong exactly and how to fix it? I've searched Google already, but can't seem to find anything useful regarding this Exception. I'm using Python 3.2.1 on my Windows (x64) testmachine and my Ubuntu server is running Python 2.6.5. (Could the version make the difference here, by the way?)</p>
  
  <p>Thanks in advance!
  Robert</p>