private static byte[] ntlmHash(final String password) throws AuthenticationException {
  try {
    final byte[] unicodePassword=password.getBytes("UnicodeLittleUnmarked");
    final MD4 md4=new MD4();
    md4.update(unicodePassword);
    return md4.getOutput();
  }
 catch (  UnsupportedEncodingException e) {
    throw new AuthenticationException("Unicode not supported: " + e.getMessage(),e);
  }
}

private static byte [ ] ntlmHash ( final String password ) throws AuthenticationException { try { final byte [ ] unicodePassword = password . getBytes ( "UnicodeLittleUnmarked" ) ; final MD4 md4 = new MD4 ( ) ; md4 . update ( unicodePassword ) ; return md4 . getOutput ( ) ; } catch ( UnsupportedEncodingException e ) { throw new AuthenticationException ( "Unicode not supported: " + e . getMessage ( ) , e ) ; } }
creates the ntlm hash of the user ' s password .
