def _fingerprint(public_key):
 try:
  if six.PY2:
   raw_key = public_key.decode('base64')
  else:
   raw_key = base64.b64decode(public_key, validate=True)
 except binascii.Error:
  return None
 ret = hashlib.md5(raw_key).hexdigest()
 chunks = [ret[i:(i + 2)] for i in range(0, len(ret), 2)]
 return ':'.join(chunks)

def _fingerprint ( public_key ) : try : if six . PY2 : raw_key = public_key . decode ( 'base64' ) else : raw_key = base64 . b64decode ( public_key , validate = True ) except binascii . Error : return None ret = hashlib . md5 ( raw_key ) . hexdigest ( ) chunks = [ ret [ i : ( i + 2 ) ] for i in range ( 0 , len ( ret ) , 2 ) ] return ':' . join ( chunks )
return a public key fingerprint based on its base64-encoded representation the fingerprint string is formatted according to rfc 4716 .