def _hostname_matches(self, hostname, entry):
for h in entry.hostnames:<EOL><INDENT>if (<EOL>h == hostname<EOL>or h.startswith("<STR_LIT>")<EOL>and not hostname.startswith("<STR_LIT>")<EOL>and constant_time_bytes_eq(self.hash_host(hostname, h), h)<EOL>):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Tests whether ``hostname`` string matches given SubDict ``entry``.

:returns bool: