'Verify that the credentials represented by this object agree with the
credentials represented by the I{H(A1)} given in C{digestHash}.
@param digestHash: A precomputed H(A1) value based on the username,
realm, and password associate with this credentials object.'

def checkHash(self, digestHash):

    response = self.fields.get('response')
    uri = self.fields.get('uri')
    nonce = self.fields.get('nonce')
    cnonce = self.fields.get('cnonce')
    nc = self.fields.get('nc')
    algo = self.fields.get('algorithm', 'md5').lower()
    qop = self.fields.get('qop', 'auth')
    expected = calcResponse(calcHA1(algo, None, None, None, nonce, cnonce, preHA1=digestHash), calcHA2(algo, self.method, uri, qop, None), algo, nonce, nc, cnonce, qop)
    return (expected == response)
