python - extracting public key from private key dynamically using M2Crypto -


is possible extract public key private key in pem format in python, m2crypto? want same thing happen when use command:

openssl rsa -in mykey.pem -pubout > mykey.pub

m2crypto.rsa has load_key function returns rsa object has save_pub_key method.

from m2crypto import rsa rsa.load_key('mykey.pem').save_pub_key('mykey.pub') 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -