Package Anomos :: Package Crypto :: Module _Certificate :: Class Certificate
[hide private]
[frames] | no frames]

Class Certificate

source code

Instance Methods [hide private]
 
__init__(self, loc=None, secure=False, tracker=False) source code
 
_gethostname(self) source code
 
_load(self)
Attempts to load the certificate and key from self.certfile and self.keyfile, Generates the certificate and key if they don't exist
source code
 
_create(*args, **kwargs) source code
 
get_ctx(self, allow_unknown_ca=False, req_peer_cert=True, session=None) source code
 
get_pub(self) source code
 
fingerprint(self) source code
tuple
decrypt(self, data, returnpad=False)
Decrypts data encrypted with this public key
source code
Method Details [hide private]

_create(*args, **kwargs)

source code 
Decorators:
  • @Anomos.Crypto.use_rand_file

decrypt(self, data, returnpad=False)

source code 

Decrypts data encrypted with this public key

Parameters:
  • data (string) - The data, padding and all, to be decrypted
  • returnpad (boolean) - return "junk" decrypted padding as well as message. Default: False
Returns: tuple
tuple (decrypted message, padding) if returnpad is true, string otherwise
Raises: