try { // Create the hashed host using salt and MAC-SHA1
synchronized( macsha1 ) { // MAC is not thread-safe
macsha1.init(_salt);
byte[] hostBytes = Util.str2byte(_host);
macsha1.update(hostBytes, 0, hostBytes.length);
_hashedHost = new byte[macsha1.getBlockSize()];
macsha1.doFinal(_hashedHost, 0);
}
} catch(Exception e) {
throw new JSchException("Failed to create HashedHostKey: " + e, e);