<commit_before><?php namespace Maatwebsite\Usher\Services;

class CodeGenerator
{

    /**
     * @var string
     */
    private static $hashing = 'sha256';

    /**
     * @return string
     */
    public static function make()
    {
        return hash(static::$hashing, self::generateEntropy());
    }

    /**
     * @return string
     */
    public static function generateEntropy()
    {
        $entropy = mcrypt_create_iv(32, self::getRandomizer());
        $entropy .= uniqid(mt_rand(), true);

        return $entropy;
    }

    /**
     * @return int
     */
    protected static function getRandomizer()
    {
        if (defined('MCRYPT_DEV_URANDOM')) {
            return MCRYPT_DEV_URANDOM;
        }
        if (defined('MCRYPT_DEV_RANDOM')) {
            return MCRYPT_DEV_RANDOM;
        }
        mt_srand();

        return MCRYPT_RAND;
    }
}<commit_msg>Remove mcrypt<commit_after><?php namespace Maatwebsite\Usher\Services;

class CodeGenerator
{
    /**
     * @return string
     */
    public static function make()
    {
        return str_random(32);
    }
}
{'fraction_non_alphanumeric': 0.12201834862385322, 'fraction_numerical': 0.006422018348623854, 'mean_word_length': 2.073239436619718, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3927064', 'n_tokens_mistral': 356, 'n_tokens_neox': 335, 'n_words': 65}