Bot.Plugins.Base.Commands.GenerateArchiveLink.CalculateMD5Hash C# (CSharp) Method

CalculateMD5Hash() protected method

protected CalculateMD5Hash ( string input ) : string
input string
return string
        protected string CalculateMD5Hash(string input)
        {
            MD5 md5 = MD5.Create();
            byte[] inputBytes = Encoding.ASCII.GetBytes(input);
            byte[] hash = md5.ComputeHash(inputBytes);

            var sb = new StringBuilder();
            for (int i = 0; i < hash.Length; i++)
            {
                sb.Append(hash[i].ToString("x2"));
            }
            return sb.ToString();
        }
GenerateArchiveLink