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
Post a Comment