def add(self, hostname, keytype, key):
for e in self._entries:<EOL><INDENT>if (hostname in e.hostnames) and (e.key.get_name() == keytype):<EOL><INDENT>e.key = key<EOL>return<EOL><DEDENT><DEDENT>self._entries.append(HostKeyEntry([hostname], key))<EOL>
Add a host key entry to the table.  Any existing entry for a
``(hostname, keytype)`` pair will be replaced.

:param str hostname: the hostname (or IP) to add
:param str keytype: key type (``"ssh-rsa"`` or ``"ssh-dss"``)
:param .PKey key: the key to add