<commit_before>﻿using System;
using System.Text;
using System.Security.Cryptography;
using System.IO;

namespace FFImageLoading.Helpers
{
    public class MD5Helper : IMD5Helper
    {
        public string MD5(Stream stream)
        {
            var hashProvider = new MD5CryptoServiceProvider();
            var bytes = hashProvider.ComputeHash(stream);
            return BitConverter.ToString(bytes)?.ToSanitizedKey();
        }

        public string MD5(string input)
        {
            var hashProvider = new MD5CryptoServiceProvider();
            var bytes = hashProvider.ComputeHash(Encoding.UTF8.GetBytes(input));
            return BitConverter.ToString(bytes)?.ToSanitizedKey();
        }
    }
}<commit_msg>Put MD5CryptoServiceProvider into using clause<commit_after>﻿using System;
using System.Text;
using System.Security.Cryptography;
using System.IO;

namespace FFImageLoading.Helpers
{
    public class MD5Helper : IMD5Helper
    {
        public string MD5(Stream stream)
        {
            using (var hashProvider = new MD5CryptoServiceProvider())
            {
                var bytes = hashProvider.ComputeHash(stream);
                return BitConverter.ToString(bytes)?.ToSanitizedKey();
            }
        }

        public string MD5(string input)
        {
            using (var hashProvider = new MD5CryptoServiceProvider())
            {
                var bytes = hashProvider.ComputeHash(Encoding.UTF8.GetBytes(input));
                return BitConverter.ToString(bytes)?.ToSanitizedKey();
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.08551372048500319, 'fraction_numerical': 0.009572431397574984, 'mean_word_length': 2.315010570824524, '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': '7314172', 'n_tokens_mistral': 418, 'n_tokens_neox': 412, 'n_words': 86}