Package tlslite :: Package utils :: Module openssl_rsakey :: Class OpenSSL_RSAKey
[hide private]
[frames] | no frames]

Class OpenSSL_RSAKey

source code

rsakey.RSAKey --+
                |
               OpenSSL_RSAKey

Instance Methods [hide private]
 
__del__(self) source code
 
__getattr__(self, name) source code
 
__init__(self, n=0, e=0)
Create a new RSA key.
source code
 
_rawPrivateKeyOp(self, m) source code
 
_rawPublicKeyOp(self, c) source code
bool
acceptsPassword(self)
Return True if the write() method accepts a password for use in encrypting the private key.
source code
bool
hasPrivateKey(self)
Return whether or not this key has a private component.
source code
str
write(self, password=None)
Return a string containing the key.
source code

Inherited from rsakey.RSAKey: __len__, decrypt, encrypt, hashAndSign, hashAndVerify, sign, verify

Static Methods [hide private]
tlslite.utils.RSAKey.RSAKey
generate(bits)
Generate a new key with the specified bit length.
source code
 
parse(s, passwordCallback=None) source code
Method Details [hide private]

__init__(self, n=0, e=0)
(Constructor)

source code 

Create a new RSA key.

If n and e are passed in, the new key will be initialized.

Parameters:
  • n - RSA modulus.
  • e - RSA public exponent.
Overrides: rsakey.RSAKey.__init__
(inherited documentation)

_rawPrivateKeyOp(self, m)

source code 
Overrides: rsakey.RSAKey._rawPrivateKeyOp

_rawPublicKeyOp(self, c)

source code 
Overrides: rsakey.RSAKey._rawPublicKeyOp

acceptsPassword(self)

source code 

Return True if the write() method accepts a password for use in encrypting the private key.

Returns: bool
Overrides: rsakey.RSAKey.acceptsPassword
(inherited documentation)

generate(bits)
Static Method

source code 

Generate a new key with the specified bit length.

Returns: tlslite.utils.RSAKey.RSAKey
Overrides: rsakey.RSAKey.generate
(inherited documentation)

hasPrivateKey(self)

source code 

Return whether or not this key has a private component.

Returns: bool
Overrides: rsakey.RSAKey.hasPrivateKey
(inherited documentation)

write(self, password=None)

source code 

Return a string containing the key.

Returns: str
A string describing the key, in whichever format (PEM) is native to the implementation.
Overrides: rsakey.RSAKey.write
(inherited documentation)