<commit_before>using System;
using System.Runtime.CompilerServices;

namespace NSec.Experimental
{
    public static class CryptographicUtilities
    {
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static void FillRandomBytes(Span<byte> data)
        {
            System.Security.Cryptography.RandomNumberGenerator.Fill(data);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static bool FixedTimeEquals(ReadOnlySpan<byte> left, ReadOnlySpan<byte> right)
        {
            return System.Security.Cryptography.CryptographicOperations.FixedTimeEquals(left, right);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static void ZeroMemory(Span<byte> buffer)
        {
            System.Security.Cryptography.CryptographicOperations.ZeroMemory(buffer);
        }
    }
}<commit_msg>Add Hex/Base64 functions<commit_after>using System;
using System.Runtime.CompilerServices;

namespace NSec.Experimental
{
    public static class CryptographicUtilities
    {
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static byte[] Base64Decode(string base64)
        {
            return NSec.Experimental.Text.Base64.Decode(base64);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static string Base64Encode(ReadOnlySpan<byte> bytes)
        {
            return NSec.Experimental.Text.Base64.Encode(bytes);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static void FillRandomBytes(Span<byte> data)
        {
            System.Security.Cryptography.RandomNumberGenerator.Fill(data);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static bool FixedTimeEquals(ReadOnlySpan<byte> left, ReadOnlySpan<byte> right)
        {
            return System.Security.Cryptography.CryptographicOperations.FixedTimeEquals(left, right);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static byte[] HexDecode(string base16)
        {
            return NSec.Experimental.Text.Base16.Decode(base16);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static string HexEncode(ReadOnlySpan<byte> bytes)
        {
            return NSec.Experimental.Text.Base16.Encode(bytes);
        }

        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static void ZeroMemory(Span<byte> buffer)
        {
            System.Security.Cryptography.CryptographicOperations.ZeroMemory(buffer);
        }
    }
}
{'fraction_non_alphanumeric': 0.0819545979222778, 'fraction_numerical': 0.008464794151596768, 'mean_word_length': 2.9274924471299095, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3005977', 'n_tokens_mistral': 726, 'n_tokens_neox': 662, 'n_words': 104}