python function for retrieving key and encryption
<p>M2Crypto package is not showing the 'recipient_public_key.pem' file at linux terminal.</p>

<p>How do I get/connect with recipient public key.</p>

<p>Exactly, I need to check how can I open this file through linux commands.</p>

<pre><code>import M2Crypto
def encrypt():
    recip = M2Crypto.RSA.load_pub_key(open('recipient_public_key.pem','rb').read())
    print recip;
    plaintext = whatever i need to encrypt
    msg = recip.public_encrypt(plaintext,RSA.pkcs1_padding)
    print msg;
</code></pre>

<p>after calling the function its not giving any output and even any error</p>

<p>i also tried as 'Will' said </p>

<pre><code>pk = open('public_key.pem','rb').read()
print pk;
rsa = M2Crypto.RSA.load_pub_key(pk)
</code></pre>

<p>what is the mistake I am not getting?</p>
