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.String
hash
private java.lang.String
salt
private byte[]
saltyBytes
private MAC
sha1
-
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.String
hashHost(java.lang.String host)
boolean
match(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:
match
in interfaceKnownHostMatchers.HostMatcher
- Throws:
java.io.IOException
-
hashHost
private java.lang.String hashHost(java.lang.String host) throws java.io.IOException, Base64DecodingException
- Throws:
java.io.IOException
Base64DecodingException
-
getSaltyBytes
private byte[] getSaltyBytes() throws java.io.IOException, Base64DecodingException
- Throws:
java.io.IOException
Base64DecodingException
-
-