using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace DLLCheck { public class CheckPass { public bool ClassCheckPass(string pass) { if(pass.Length < 6) return false; int countUp = 0, countLow = 0; for (int i = 0; i < pass.Length; i++) { if (char.IsLower(pass[i])) countLow++; if (char.IsUpper(pass[i])) countUp++; } if(countUp == 0 || countLow == 0) return false; int countNum = 0; for (int i = 0; i < pass.Length; i++) if (char.IsDigit(pass[i])) countNum++; if(countNum > pass.Length / 2) return false; int countSim = 0; for (int i = 0; i < pass.Length; i++) if ("!@#$%^".Contains(pass[i])) countSim++; if(countSim == 0) return false; return true; } } }