| Home | Trees | Index | Help | 
|---|
| Package tlslite :: Package utils :: Module RSAKey :: Class RSAKey | 
 | 
OpenSSL_RSAKey,
    PyCrypto_RSAKey,
    Python_RSAKeyThis is an abstract base class for RSA keys.
Particular implementations of RSA keys, such as OpenSSL_RSAKey.OpenSSL_RSAKey, Python_RSAKey.Python_RSAKey, and PyCrypto_RSAKey.PyCrypto_RSAKey, inherit 
from this.
tlslite.utils.keyfactory.
| Method Summary | |
|---|---|
| Create a new RSA key. | |
| int | Return the length of this key in bits. | 
| bool | Return True if the write() method accepts a password for use in encrypting the private key. | 
| array.arrayof unsigned bytes or None. | Decrypt the passed-in bytes. | 
| array.arrayof unsigned bytes. | Encrypt the passed-in bytes. | 
| tlslite.utils.RSAKey.RSAKey | Generate a new key with the specified bit length. (Static method) | 
| str | Return the cryptoID sigAlgo value corresponding to this key. | 
| str | Return the cryptoID <keyHash> value corresponding to this key. | 
| array.arrayof unsigned bytes. | Hash and sign the passed-in bytes. | 
| bool | Hash and verify the passed-in bytes with the signature. | 
| bool | Return whether or not this key has a private component. | 
| array.arrayof unsigned bytes. | Sign the passed-in bytes. | 
| bool | Verify the passed-in bytes with the signature. | 
| str | Return a string containing the key. | 
| str | Return a string containing the key. | 
| Instance Method Details | 
|---|
| __init__(self,
          n=0,
          e=0)
     | 
| __len__(self)
    Return the length of this key in bits. | 
| acceptsPassword(self)Return True if the write() method accepts a password for use in encrypting the private key.
 | 
| decrypt(self, encBytes)Decrypt the passed-in bytes.This requires the key to have a private component. It performs PKCS1 decryption of the passed-in data. 
 | 
| encrypt(self, bytes)Encrypt the passed-in bytes.This performs PKCS1 encryption of the passed-in data. 
 | 
| getSigningAlgorithm(self)Return the cryptoID sigAlgo value corresponding to this key.
 | 
| hash(self)Return the cryptoID <keyHash> value corresponding to this key.
 | 
| hashAndSign(self, bytes)Hash and sign the passed-in bytes.This requires the key to have a private component. It performs a PKCS1-SHA1 signature on the passed-in data. 
 | 
| hashAndVerify(self, sigBytes, bytes)Hash and verify the passed-in bytes with the signature.This verifies a PKCS1-SHA1 signature on the passed-in data. 
 | 
| hasPrivateKey(self)Return whether or not this key has a private component.
 | 
| sign(self, bytes)Sign the passed-in bytes.This requires the key to have a private component. It performs a PKCS1 signature on the passed-in data. 
 | 
| verify(self, sigBytes, bytes)Verify the passed-in bytes with the signature.This verifies a PKCS1 signature on the passed-in data. 
 | 
| write(self, password=None)Return a string containing the key.
 | 
| writeXMLPublicKey(self, indent='')Return a string containing the key.
 | 
| Static Method Details | 
|---|
| generate(bits)Generate a new key with the specified bit length.
 | 
| Home | Trees | Index | Help | 
|---|
| Generated by Epydoc 2.0 on Mon Feb 21 21:56:55 2005 | http://epydoc.sf.net |