question: private void validateResponseValue ( byte [ ] fromServer ) throws SaslException { if ( fromServer == null ) { throw new SaslException ( "DIGEST-MD5: Authenication failed. " + "Expecting 'rspauth' authentication success message" ) ; } try { byte [ ] expected = generateResponseValue ( "" , digestUri , negotiatedQop , username , negotiatedRealm , passwd , nonce , cnonce , nonceCount , authzidBytes ) ; if ( ! Arrays . equals ( expected , fromServer ) ) { throw new SaslException ( "Server's rspauth value does not match what client expects" ) ; } } catch ( NoSuchAlgorithmException e ) { throw new SaslException ( "Problem generating response value for verification" , e ) ; } catch ( IOException e ) { throw new SaslException ( "Problem generating response value for verification" , e ) ; } }
target:  From RFC 2831, Section 2.1.3: Step Three [Server] sends a message formatted as follows: response-auth = "rspauth" "=" response-value where response-value is calculated as above, using the values sent in step two, except that if qop is "auth", then A2 is A2 = { ":", digest-uri-value } And if qop is "auth-int" or "auth-conf" then A2 is A2 = { ":", digest-uri-value, ":00000000000000000000000000000000" }