Re: python function for retrieving key and encryption

2009-07-27 Thread Piet van Oostrum
> jayshree (j) wrote: >j> import M2Crypto >j> from M2Crypto import RSA,SSL >j> def encrypt(): >j> pk = open('my_key.public.pem', 'rb').read() >j> rsa = M2Crypto.RSA.load_pub_key(pk) #return a M2Crypto.RSA.RSA_pub >j> object. >j> plaintext = 4545479545655576767767686688782344 >j>

Re: python function for retrieving key and encryption

2009-07-26 Thread jayshree
On Jul 23, 5:48 pm, Piet van Oostrum wrote: > > jayshree (j) wrote: > >j> On Jul 21, 8:59 pm, Piet van Oostrum wrote: > >>> The recipient_public_key.pem file is the public key of the recipient > >>> which means the person that is going to receive the encrypted message. > >>> You should get i

Re: python function for retrieving key and encryption

2009-07-23 Thread Piet van Oostrum
> jayshree (j) wrote: >j> On Jul 21, 8:59 pm, Piet van Oostrum wrote: >>> The recipient_public_key.pem file is the public key of the recipient >>> which means the person that is going to receive the encrypted message. >>> You should get it from the recipient him/herself or from some key sto

Re: python function for retrieving key and encryption

2009-07-22 Thread jayshree
On Jul 21, 8:59 pm, Piet van Oostrum wrote: > > jayshree (j) wrote: > >j> M2Crypto package not showing the 'recipient_public_key.pem' file at > >j> linux terminal .how do i get/connect with recipient public key. > >j> exactly i need to check how can i open this file through linux > >j> comman

Re: python function for retrieving key and encryption

2009-07-21 Thread Piet van Oostrum
> jayshree (j) wrote: >j> M2Crypto package not showing the 'recipient_public_key.pem' file at >j> linux terminal .how do i get/connect with recipient public key. >j> exactly i need to check how can i open this file through linux >j> commands. >j> import M2Crypto def encrypt(): recip = M2Cry

python function for retrieving key and encryption

2009-07-20 Thread jayshree
M2Crypto package not showing the 'recipient_public_key.pem' file at linux terminal .how do i get/connect with recipient public key. exactly i need to check how can i open this file through linux commands. import M2Crypto def encrypt(): recip = M2Crypto.RSA.load_pub_key(open ('recipient_public_key