Package tlslite :: Package utils :: Module python_rsakey :: Class Python_RSAKey
[hide private]
[frames] | no frames]

Class Python_RSAKey

source code

   object --+    
            |    
rsakey.RSAKey --+
                |
               Python_RSAKey

Instance Methods [hide private]
 
__init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=0)
Create a new RSA key.
source code
 
_rawPrivateKeyOp(self, m) source code
 
_rawPrivateKeyOpHelper(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

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

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
_parseASN1PrivateKey(privateKeyP) source code
 
_parsePKCS8(bytes) source code
 
_parseSSLeay(bytes) source code
tlslite.utils.RSAKey.RSAKey
generate(bits)
Generate a new key with the specified bit length.
source code
 
parsePEM(s, passwordCallback=None)
Parse a string containing a <privateKey> or <publicKey>, or PEM-encoded key.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, n=0, e=0, d=0, p=0, q=0, dP=0, dQ=0, qInv=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: object.__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)