title: How to encrypt using public key?
body: <pre><code>msg = "this is msg to encrypt"
  
  pub_key = M2Crypto.RSA.load_pub_key('mykey.py') // This method is taking PEM file.
  
  encrypted = pub_key.public_encrypt(msg, M2Crypto.RSA.pkcs1_padding) 
  </code></pre>
  
  <p>Now I am trying to give file containing radix64 format public key as a parameter in this method and unable to get expected result i.e encryption using radix64 format public key.</p>
  
  <p>Is there any other method in the Python API which can encrypt msg using public key after trying some mechanism?</p>
  
  <p>I am getting my public key from public key server with some HTML wrapping and in radix64 format. How can I convert the public key so that it can be accepted by any encryption method?</p>