OpenSSL RSA key utilities.
OpenSSLKeyGenError
[source]¶Bases: exceptions.Exception
Raised when there is a problem generating a new key.
createRSAKey
(bits=1024)[source]¶Create a new RSA keypair.
The current keysize for OR RSA keys is 1024 bits.
Parameters: | bits (int) – The bitlength of the keypair to generate. |
---|---|
Raises OpenSSLKeyGenError: | |
If key creation failed. | |
Return type: | OpenSSL.crypto.PKey |
Returns: | An RSA keypair of bitlength bits . |