Class KnownHostMatchers.HashedHostMatcher
- java.lang.Object
-
- com.hierynomus.sshj.transport.verification.KnownHostMatchers.HashedHostMatcher
-
- All Implemented Interfaces:
KnownHostMatchers.HostMatcher
- Enclosing class:
- KnownHostMatchers
private static class KnownHostMatchers.HashedHostMatcher extends java.lang.Object implements KnownHostMatchers.HostMatcher
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringhashprivate java.lang.Stringsaltprivate byte[]saltyBytesprivate MACsha1
-
Constructor Summary
Constructors Constructor Description HashedHostMatcher(java.lang.String hash)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private byte[]getSaltyBytes()private java.lang.StringhashHost(java.lang.String host)booleanmatch(java.lang.String hostname)
-
-
-
Field Detail
-
sha1
private final MAC sha1
-
hash
private final java.lang.String hash
-
salt
private final java.lang.String salt
-
saltyBytes
private byte[] saltyBytes
-
-
Constructor Detail
-
HashedHostMatcher
HashedHostMatcher(java.lang.String hash) throws SSHException- Throws:
SSHException
-
-
Method Detail
-
match
public boolean match(java.lang.String hostname) throws java.io.IOException- Specified by:
matchin interfaceKnownHostMatchers.HostMatcher- Throws:
java.io.IOException
-
hashHost
private java.lang.String hashHost(java.lang.String host) throws java.io.IOException, Base64DecodingException- Throws:
java.io.IOExceptionBase64DecodingException
-
getSaltyBytes
private byte[] getSaltyBytes() throws java.io.IOException, Base64DecodingException- Throws:
java.io.IOExceptionBase64DecodingException
-
-