public static byte [ ] getNTLM2SessionResponse ( String password , byte [ ] challenge , byte [ ] clientNonce ) throws Exception { byte [ ] ntlmHash = ntlmHash ( password ) ; MessageDigest md5 = MessageDigest . getInstance ( "MD5" ) ; md5 . update ( challenge ) ; md5 . update ( clientNonce ) ; byte [ ] sessionHash = new byte [ 8 ] ; System . arraycopy ( md5 . digest ( ) , 0 , sessionHash , 0 , 8 ) ; return lmResponse ( ntlmHash , sessionHash ) ; }
Calculates the NTLM2 Session Response for the given challenge using the specified password and client nonce .