<commit_before>package org.bouncycastle.est;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URISyntaxException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.MD5Digest;
import org.bouncycastle.crypto.io.DigestOutputStream;
import org.bouncycastle.util.Strings;
import org.bouncycastle.util.encoders.Hex;

/**
 * Implements DigestAuth.
 */
public class DigestAuth
    implements ESTAuth
{

    private final String realm;
    private final String username;
    private final String password;


    private static SecureRandom secureRandom = new SecureRandom();

    public DigestAuth(String username, String password)
    {
        this.username = username;
        this.password = password;
        this.realm = null;
    }

    public DigestAuth(String realm, String username, String password)<commit_msg>JavaDoc<commit_after>package org.bouncycastle.est;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URISyntaxException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.digests.MD5Digest;
import org.bouncycastle.crypto.io.DigestOutputStream;
import org.bouncycastle.util.Strings;
import org.bouncycastle.util.encoders.Hex;

/**
 * Implements DigestAuth.
 */
public class DigestAuth
    implements ESTAuth
{

    private final String realm;
    private final String username;
    private final String password;


    // TODO: this needs to be removed
    private static SecureRandom secureRandom = new SecureRandom();

    public DigestAuth(String username, String password)
    {
        this.username = username;
        this.password = password;
        this.realm = null;
    }

    public DigestAuth(String realm, String username, String password)
{'fraction_non_alphanumeric': 0.08594491927825261, 'fraction_numerical': 0.000949667616334283, 'mean_word_length': 4.189655172413793, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1787596', 'n_tokens_mistral': 630, 'n_tokens_neox': 616, 'n_words': 151}