title: AES encryption/decryption between Ruby-OpenSSL, PyCrypto
body: <p>I have to encrypt a piece of text using Ruby. I've used the Ruby-Openssl gem for that purpose. This encrypted text is them passed to a python program using which I have to decrypt it. I've used Pycrypto for the purpose.</p>
  
  <p>The problem is, in Pycrypto we have to specify the padding convention manually. In Ruby, the padding is done automatically. I'm using AES-CBC block cipher mode. This padding causes problems as its stripping cannot be performed properly in Python. As an example, these are the base64 encodings of an encrypted text in both Ruby and Python:</p>
  
  <pre><code>Python: aENJY28lvE89yY2T/te8vWwdeoeSqSwwlrOAv7b3AWw=
  Ruby:   aENJY28lvE89yY2T/te8vVoQE6JNxdSRgYXC8mqF3nI=
  </code></pre>
  
  <p>Please help...</p>