Ejemplo n.º 1
0
        private bool ChekIfPolicyWorks(PasswordPolicyDay2a policy)
        {
            var result      = Regex.Matches(policy.Password, policy.Letter);
            var checkResult = CheckResult(result, policy);

            return(checkResult);
        }
Ejemplo n.º 2
0
 private bool CheckResult(MatchCollection matches, PasswordPolicyDay2a policy)
 {
     return(matches.Count <= policy.MaxOccurences &&
            matches.Count >= policy.MinOccurences);
 }