public abstract class AbstractHostKeyManager extends java.lang.Object implements SshHostKeyManager
SshHostKeyManager that provides some
default common methods.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
HASH_DELIM |
protected static java.lang.String |
HASH_MAGIC |
| Constructor and Description |
|---|
AbstractHostKeyManager(SshConfiguration configuration)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkHost(java.lang.String storedHostName,
java.lang.String hostToCheck) |
protected SshHostKey[] |
doGetKeysForHost(java.lang.String host,
java.lang.String type)
Default simple implementation.
|
protected SshConfiguration |
getConfiguration() |
SshHostKey[] |
getKeysForHost(java.lang.String host,
java.lang.String type)
Get all the keys that are valid for the specified host and key type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, getKeys, isWriteable, removeprotected static final java.lang.String HASH_MAGIC
protected static final java.lang.String HASH_DELIM
public AbstractHostKeyManager(SshConfiguration configuration)
configuration - configurationprotected SshConfiguration getConfiguration()
public final SshHostKey[] getKeysForHost(java.lang.String host, java.lang.String type)
SshHostKeyManagerThe returned list is guaranteed to be non-null, i.e. it will be empty if no matches are found.
getKeysForHost in interface SshHostKeyManagerhost - host to matchtype - type (one of SshConfiguration#PUBLIC_KEY_SSHDSS or
SshConfiguration.PUBLIC_KEY_SSHRSA.protected SshHostKey[] doGetKeysForHost(java.lang.String host, java.lang.String type)
SshHostKeyManager.getKeys() and matches
the type and hostname. Providers may override if they have a more
efficient method.host - hostnametype - typeprotected boolean checkHost(java.lang.String storedHostName,
java.lang.String hostToCheck)
Copyright © 2018. All rights reserved.