Python OpenSSL generates a public and private key pair

I am having a problem finding a command that would generate a public / private key pair using OpenSSL. Can anyone show me some example code of this in action.

thank

+3


source to share


1 answer


Using pyOpenSSL bindings :

OpenSSL.crypto.PKey().generate_key(type, bits)

      

Create a public / private key pair of type type

(one of TYPE_RSA

and TYPE_DSA

) with size bits

.



Documents

+7


source







All Articles