@Override
            public String generateAuthResponse(
            final HttpHost host,
            final HttpRequest request,
            final HttpContext context) throws AuthenticationException {

        Args.notNull(request, "HTTP request");
        if (this.paramMap.get("realm") == null) {
            throw new AuthenticationException("missing realm");
        }
        if (this.paramMap.get("nonce") == null) {
            throw new AuthenticationException("missing nonce");
        }

        if (context != null) {
            final HttpClientContext clientContext = HttpClientContext.cast(context);
            final String nextNonce = clientContext.getNextNonce();
            if (!TextUtils.isBlank(nextNonce)) {
                this.paramMap.put("nonce", nextNonce);
                clientContext.setNextNonce(null);
            }
        }

        return createDigestResponse(request);
    }
@deprecated This constructor is deprecated to enforce the use of {@link StandardCharsets#UTF_8} encoding
in compliance with RFC 7616 for HTTP Digest Access Authentication. Use the default constructor {@link #DigestScheme()} instead.

@param charset the {@link Charset} set to be used for encoding credentials. This parameter is ignored as UTF-8 is always used.
httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/DigestScheme.java