|  | @@ -13,22 +13,24 @@ public class MD5Encrypt
 | 
	
		
			
				|  |  |      /// 16位MD5加密
 | 
	
		
			
				|  |  |      /// </summary>
 | 
	
		
			
				|  |  |      /// <param name="password"></param>
 | 
	
		
			
				|  |  | +    /// <param name="lowerCase"></param>
 | 
	
		
			
				|  |  |      /// <returns></returns>
 | 
	
		
			
				|  |  | -    public static string Encrypt16(string password)
 | 
	
		
			
				|  |  | +    public static string Encrypt16(string password, bool lowerCase = false)
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  |          if (password.IsNull())
 | 
	
		
			
				|  |  |              return null;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          using var md5 = MD5.Create();
 | 
	
		
			
				|  |  | -        return md5.ComputeHash(Encoding.UTF8.GetBytes(password)).ToHex();
 | 
	
		
			
				|  |  | +        return md5.ComputeHash(Encoding.UTF8.GetBytes(password)).ToHex(lowerCase);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /// <summary>
 | 
	
		
			
				|  |  |      /// 32位MD5加密
 | 
	
		
			
				|  |  |      /// </summary>
 | 
	
		
			
				|  |  |      /// <param name="password"></param>
 | 
	
		
			
				|  |  | +    /// <param name="lowerCase"></param>
 | 
	
		
			
				|  |  |      /// <returns></returns>
 | 
	
		
			
				|  |  | -    public static string Encrypt32(string password = "")
 | 
	
		
			
				|  |  | +    public static string Encrypt32(string password = "", bool lowerCase = false)
 | 
	
		
			
				|  |  |      {
 | 
	
		
			
				|  |  |          if (password.IsNull())
 | 
	
		
			
				|  |  |              return null;
 | 
	
	
		
			
				|  | @@ -36,9 +38,10 @@ public class MD5Encrypt
 | 
	
		
			
				|  |  |          using var md5 = MD5.Create();
 | 
	
		
			
				|  |  |          string pwd = string.Empty;
 | 
	
		
			
				|  |  |          byte[] s = md5.ComputeHash(Encoding.UTF8.GetBytes(password));
 | 
	
		
			
				|  |  | +        var format = lowerCase ? "x2" : "X2";
 | 
	
		
			
				|  |  |          foreach (var item in s)
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | -            pwd = string.Concat(pwd, item.ToString("X"));
 | 
	
		
			
				|  |  | +            pwd = string.Concat(pwd, item.ToString(format));
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return pwd;
 | 
	
		
			
				|  |  |      }
 |