def get_public_rsa_fingerprint(key_location=None, key_file_obj=None, passphrase=None):
 privkey = get_rsa_key(key_location=key_location, key_file_obj=key_file_obj, passphrase=passphrase, use_pycrypto=True)
 pubkey = privkey.publickey()
 md5digest = hashlib.md5(pubkey.exportKey('DER')).hexdigest()
 fingerprint = insert_char_every_n_chars(md5digest, ':', 2)
 key = (key_location or key_file_obj)
 log.debug(('rsa public key fingerprint (%s): %s' % (key, fingerprint)))
 return fingerprint

def get_public_rsa_fingerprint ( key_location = None , key_file_obj = None , passphrase = None ) : privkey = get_rsa_key ( key_location = key_location , key_file_obj = key_file_obj , passphrase = passphrase , use_pycrypto = True ) pubkey = privkey . publickey ( ) md5digest = hashlib . md5 ( pubkey . exportKey ( 'DER' ) ) . hexdigest ( ) fingerprint = insert_char_every_n_chars ( md5digest , ':' , 2 ) key = ( key_location or key_file_obj ) log . debug ( ( 'rsa public key fingerprint (%s): %s' % ( key , fingerprint ) ) ) return fingerprint
returns the fingerprint of the public portion of an rsa key as a 47-character string .