def parse_hosts_line(line):
 (host, keytype, key) = line.strip().split(None, 3)[:3]
 fp_plain = hashlib.md5(b64decode(key)).hexdigest()
 fingerprint = u':'.join([(a + b) for (a, b) in zip(fp_plain[::2], fp_plain[1::2])])
 if host.startswith(u'|1|'):
  host = _(u'[hostname hashed]')
 return (host, keytype, fingerprint)

def parse_hosts_line ( line ) : ( host , keytype , key ) = line . strip ( ) . split ( None , 3 ) [ : 3 ] fp_plain = hashlib . md5 ( b64decode ( key ) ) . hexdigest ( ) fingerprint = u':' . join ( [ ( a + b ) for ( a , b ) in zip ( fp_plain [ : : 2 ] , fp_plain [ 1 : : 2 ] ) ] ) if host . startswith ( u'|1|' ) : host = _ ( u'[hostname hashed]' ) return ( host , keytype , fingerprint )
parses single hosts line into tuple host .