def get_private_rsa_fingerprint(key_location=None, key_file_obj=None, passphrase=None):
 k = get_rsa_key(key_location=key_location, key_file_obj=key_file_obj, passphrase=passphrase, use_pycrypto=True)
 sha1digest = hashlib.sha1(k.exportKey('DER', pkcs=8)).hexdigest()
 fingerprint = insert_char_every_n_chars(sha1digest, ':', 2)
 key = (key_location or key_file_obj)
 log.debug(('rsa private key fingerprint (%s): %s' % (key, fingerprint)))
 return fingerprint

def get_private_rsa_fingerprint ( key_location = None , key_file_obj = None , passphrase = None ) : k = get_rsa_key ( key_location = key_location , key_file_obj = key_file_obj , passphrase = passphrase , use_pycrypto = True ) sha1digest = hashlib . sha1 ( k . exportKey ( 'DER' , pkcs = 8 ) ) . hexdigest ( ) fingerprint = insert_char_every_n_chars ( sha1digest , ':' , 2 ) key = ( key_location or key_file_obj ) log . debug ( ( 'rsa private key fingerprint (%s): %s' % ( key , fingerprint ) ) ) return fingerprint
returns the fingerprint of a private rsa key as a 59-character string .