<commit_before>﻿namespace Frameplate.Security.Encryption.Salters
{
    using System;
    using System.Linq;

    public class RandomSalter : ISalter
    {
        private static readonly Random Random = new Random();

        private readonly int _length;

        public RandomSalter()
        {
        }

        public RandomSalter(int length)
        {
            _length = length;
        }

        public string GenerateSalt()
        {
            var saltBytes = Enumerable.Range(0, _length)
                .Select(_ => (byte) Random.Next())
                .ToArray();

            return Convert.ToBase64String(saltBytes);
        }
    }
}<commit_msg>salting with 8 digits by default<commit_after>﻿namespace Frameplate.Security.Encryption.Salters
{
    using System;
    using System.Linq;

    public class RandomSalter : ISalter
    {
        private static readonly Random Random = new Random();

        private readonly int _length;

        public RandomSalter()
        {
            _length = 8;
        }

        public RandomSalter(int length)
        {
            _length = length;
        }

        public string GenerateSalt()
        {
            var saltBytes = Enumerable.Range(0, _length)
                .Select(_ => (byte) Random.Next())
                .ToArray();

            return Convert.ToBase64String(saltBytes);
        }
    }
}
{'fraction_non_alphanumeric': 0.08430232558139535, 'fraction_numerical': 0.005813953488372093, 'mean_word_length': 1.6842105263157894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7319925', 'n_tokens_mistral': 379, 'n_tokens_neox': 350, 'n_words': 89}