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

java - BeanIO write annotated class to fixedlength -

Using Java 8 lambdas/transformations to combine and flatten two Maps -

How to connect android app to App engine -