code: private static byte[] ntlmv2Hash(final String domain, final String user, final byte[] ntlmHash)
              throws AuthenticationException {
          if (UNICODE_LITTLE_UNMARKED == null) {
              throw new AuthenticationException("Unicode not supported");
          }
          final HMACMD5 hmacMD5 = new HMACMD5(ntlmHash);
          // Upper case username, mixed case target!!
          hmacMD5.update(user.toUpperCase(Locale.ROOT).getBytes(UNICODE_LITTLE_UNMARKED));
          if (domain != null) {
              hmacMD5.update(domain.getBytes(UNICODE_LITTLE_UNMARKED));
          }
          return hmacMD5.getOutput();
      }
docs: Creates the NTLMv2 Hash of the user's password.
  
  @return The NTLMv2 Hash, used in the calculation of the NTLMv2 and LMv2
  Responses.