def compute_digest_response(<EOL>self, realm, user_name, method, uri, nonce, cnonce, qop, nc, environ<EOL>):
def md5h(data):<EOL><INDENT>return md5(compat.to_bytes(data)).hexdigest()<EOL><DEDENT>def md5kd(secret, data):<EOL><INDENT>return md5h(secret + "<STR_LIT::>" + data)<EOL><DEDENT>A1 = self.domain_controller.digest_auth_user(realm, user_name, environ)<EOL>if not A1:<EOL><INDENT>return False<EOL><DEDENT>A2 = method + "<STR_LIT::>" + uri<EOL>if qop:<EOL><INDENT>res = md5kd(<EOL>A1, nonce + "<STR_LIT::>" + nc + "<STR_LIT::>" + cnonce + "<STR_LIT::>" + qop + "<STR_LIT::>" + md5h(A2)<EOL>)<EOL><DEDENT>else:<EOL><INDENT>res = md5kd(A1, nonce + "<STR_LIT::>" + md5h(A2))<EOL><DEDENT>return res<EOL>
Computes digest hash.

        Calculation of the A1 (HA1) part is delegated to the dc interface method
        `digest_auth_user()`.

        Args:
            realm (str):
            user_name (str):
            method (str): WebDAV Request Method
            uri (str):
            nonce (str): server generated nonce value
            cnonce (str): client generated cnonce value
            qop (str): quality of protection
            nc (str) (number), nonce counter incremented by client
        Returns:
            MD5 hash string
            or False if user rejected by domain controller