code: func response(auth *authorization, password, method, uri string) string {
  	ha1 := makeHA1(auth.realm, auth.username, password, auth.algorithm)
  	ha2 := makeHA2(auth, method, uri)
  
  	var r string
  	if auth.qop == "auth" || auth.qop == "auth-int" {
  		r = fmt.Sprintf("%s:%s:%s:%s:%s:%s", ha1, auth.nonce, auth.nc, auth.cnonce, auth.qop, ha2)
  	} else {
  		r = fmt.Sprintf("%s:%s:%s", ha1, auth.nonce, ha2)
  	}
  	return hash([]byte(r), auth.algorithm)
  }
docs: // Response calculates the correct digest auth response. If the qop directive's
  // value is "auth" or "auth-int" , then compute the response as
  //
  //    RESPONSE = H(HA1:nonce:nonceCount:clientNonce:qop:HA2)
  //
  // and if the qop directive is unspecified, then compute the response as
  //
  //    RESPONSE = H(HA1:nonce:HA2)
  //
  // where H is one of MD5 or SHA256.