<commit_before>package de.slackspace.openkeepass.crypto;

import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.SecureRandom;

public class RandomGenerator {

    private SecureRandom random;

    public RandomGenerator() {
        try {
            random = SecureRandom.getInstance("SHA1PRNG", "SUN");
        } catch (NoSuchAlgorithmException e) {
            throw new UnsupportedOperationException("Algorithm 'SHA1PRNG' is unknown", e);
        } catch (NoSuchProviderException e) {
            throw new UnsupportedOperationException("Provider 'SUN' is unknown", e);
        }
    }

    public byte[] getRandomBytes(int numBytes) {
        byte[] randomBytes = new byte[numBytes];
        random.nextBytes(randomBytes);

        return randomBytes;
    }
}<commit_msg>Don't require a particular provider<commit_after>package de.slackspace.openkeepass.crypto;

import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.SecureRandom;

public class RandomGenerator {

    private SecureRandom random;

    public RandomGenerator() {
        try {
            random = SecureRandom.getInstance("SHA1PRNG");
        } catch (NoSuchAlgorithmException e) {
            throw new UnsupportedOperationException("Algorithm 'SHA1PRNG' is unknown", e);
        }
    }

    public byte[] getRandomBytes(int numBytes) {
        byte[] randomBytes = new byte[numBytes];
        random.nextBytes(randomBytes);

        return randomBytes;
    }
}
{'fraction_non_alphanumeric': 0.0888030888030888, 'fraction_numerical': 0.002574002574002574, 'mean_word_length': 3.3435754189944134, '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': '982199', 'n_tokens_mistral': 414, 'n_tokens_neox': 399, 'n_words': 95}