def mask_hash(hash, show=6, char=u'*'):
 masked = hash[:show]
 masked += (char * len(hash[show:]))
 return masked

def mask_hash ( hash , show = 6 , char = u'*' ) : masked = hash [ : show ] masked += ( char * len ( hash [ show : ] ) ) return masked
returns the given hash .