Package M2Crypto :: Module RSA :: Class RSA_pub
[frames] | no frames]

Class RSA_pub




Object interface to an RSA public key.

Instance Methods
 
__setattr__(self, name, value)
 
check_key(self)
 
private_decrypt(self, *argv)
 
private_encrypt(self, *argv)
 
save_key(self, file, *args, **kw)
Save public key to file.
 
save_key_bio(self, bio, *args, **kw)
Save public key to BIO.

Inherited from RSA: __del__, __getattr__, __init__, __len__, as_pem, m2_rsa_free, pub, public_decrypt, public_encrypt, save_key_der, save_key_der_bio, save_pem, save_pub_key, save_pub_key_bio, sign, sign_rsassa_pss, verify, verify_rsassa_pss

Method Details

check_key(self)

 
Overrides: RSA.check_key

private_decrypt(self, *argv)

 
Overrides: RSA.private_decrypt

private_encrypt(self, *argv)

 
Overrides: RSA.private_encrypt

save_key(self, file, *args, **kw)

 

Save public key to file.

Parameters:
  • file - Name of file to save key to.
  • cipher - Symmetric cipher to protect the key. The default cipher is 'aes_128_cbc'. If cipher is None, then the key is saved in the clear.
  • callback - A Python callable object that is invoked to acquire a passphrase with which to protect the key. The default is util.passphrase_callback.
Overrides: RSA.save_key

save_key_bio(self, bio, *args, **kw)

 

Save public key to BIO.

Parameters:
  • bio - M2Crypto.BIO.BIO object to save key to.
  • cipher - Symmetric cipher to protect the key. The default cipher is 'aes_128_cbc'. If cipher is None, then the key is saved in the clear.
  • callback - A Python callable object that is invoked to acquire a passphrase with which to protect the key. The default is util.passphrase_callback.
Overrides: RSA.save_key_bio