docs: def generate_digest(self):
          """RFC 2617."""
          from hashlib import md5
          ha1 = self.username + ':' + self.realm + ':' + self.password
          HA1 = md5(ha1.encode('UTF-8')).hexdigest()
          ha2 = self.method + ':' + self.url
          HA2 = md5(ha2.encode('UTF-8')).hexdigest()
          encrypt_response = HA1 + ':' + self.nonce + ':' + HA2
          response = md5(encrypt_response.encode('UTF-8')).hexdigest()
  
          digest_auth = 'Digest '
          digest_auth += 'username=\"' + self.username + "\", "
          digest_auth += 'realm=\"' + self.realm + "\", "
          digest_auth += "algorithm=\"MD5\", "
          digest_auth += 'nonce=\"' + self.nonce + "\", "
          digest_auth += 'uri=\"' + self.url + "\", "
          digest_auth += 'response=\"' + response + '\"'
          return digest_auth