title: AES-ECB encryption (Difference between Python Crypto.Cipher and openssl)
body: <p>i have a problem with encryption using python and openssl.</p>
  
  <p>i wrote this small python script:</p>
  
  <pre><code>#!/usr/bin/python
  from Crypto.Cipher import AES
  
  obj = AES.new('Thisisakey123456', AES.MODE_ECB)
  message = "Sample text....."
  ciphertext = obj.encrypt(message)
  print ciphertext
  </code></pre>
  
  <p>When i run the script with this command:</p>
  
  <pre><code>$ ./enc.py | base64
  </code></pre>
  
  <p>i get <code>E0lNh0wtSg9lxxKClBEITAo=</code> as a result.</p>
  
  <p>If i do the same (or obviously it's not the same ;) ) in openssl i get another result:</p>
  
  <pre><code>$ echo -n "Sample text....." | openssl aes-128-ecb -k "Thisisakey123456" -nosalt -nopad | base64
  yvNTGC+gwUK38uyJXIk/sQ==
  </code></pre>
  
  <p>What i am doing wrong?? i would expect the same base64 encoded string.</p>
  
  <p>btw: i know ecb is bad, but i just play around, so it's no problem... ;)</p>