BF2Statistics.StringExtensions.GetMD5Hash C# (CSharp) Method

GetMD5Hash() public static method

Converts the input string into its MD5 Hex variant
public static GetMD5Hash ( this input, bool upperCase = true, Encoding Encoding = null ) : string
input this
upperCase bool Uppercase the characters?
Encoding System.Text.Encoding The encoding of the string. Default is UTF8
return string
        public static string GetMD5Hash(this string input, bool upperCase = true, Encoding Encoding = null)
        {
            using(MD5 Md5 = MD5.Create())
            {
                if (Encoding == null) Encoding = Encoding.UTF8;
                return Md5.ComputeHash(Encoding.GetBytes(input)).ToHex(upperCase);
            }
        }