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); } }