def createKeyPair(type, bits):
pkey = crypto.PKey()<EOL>pkey.generate_key(type, bits)<EOL>return pkey<EOL>
Create a public/private key pair.

Arguments: type - Key type, must be one of TYPE_RSA and TYPE_DSA
           bits - Number of bits to use in the key
Returns:   The public/private key pair in a PKey object