public static string MD5Encrypt(string text) { MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] b = Encoding.Default.GetBytes(text); byte[] b2 = md5.ComputeHash(b); string result = BitConverter.ToString(b2); result = result.Replace("-", "").ToLower(); return result; }