How to use .pem file with Python M2Crypto -


I used openssl to generate an RSA key pair:

  openssl Genrsa -out my_key Private.pem 1024 openssl rsa-my_key.private.pem -pubout -out my_key.public.pem  

Now I use this my_key.public.pem file any other function I want to .pi file:

  Import MCCRCPO from RSA, SSL Def Encrypt (), imported: PK = Open ('my_key.public.pem', 'RB'). Read () RSA = MCCRPETo .RSA.load_pub_key (pk) file Brint RSA;  

Am I doing this right? Both files are in the same directory, but this function is not giving any output.

code> load_pub_key is expected to have a file name in the form of a < Code> M2Crypto.RSA.RSA_pub , which does not seem to be printed. What are you actually trying to achieve?


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -