private void writeObject(final ObjectOutputStream out) throws IOException {
        out.defaultWriteObject();
        out.writeUTF(defaultCharset.name());
    }
Creates a random cnonce value based on the specified algorithm's expected entropy.
Adjusts the length of the byte array based on the algorithm to ensure sufficient entropy.

@param algorithm the algorithm for which the cnonce is being generated (e.g., "MD5", "SHA-256", "SHA-512-256").
@return The cnonce value as a byte array.
@since 5.5
httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/DigestScheme.java