Ejemplo n.º 1
0
        //REMOVED to prevent password leaking (c# strings NOT immutable)
        /// <summary>
        /// The password that was used to generate these results
        /// </summary>
        //public string Password { get; set; }

        // constructor added to ease the "boxing" methodology
        internal Result(MFZ.Result source)
        {
            this.CalcTime         = source.CalcTime;
            this.CrackTime        = source.CrackTime;
            this.CrackTimeDisplay = source.CrackTimeDisplay;
            this.Entropy          = source.Entropy;
            if (source.MatchSequence != null)
            {
                this.MatchSequence = new List <miniLockManaged.ZXCVBN.Match>();
                foreach (MFZ.Match m in source.MatchSequence)
                {
                    this.MatchSequence.Add(new Match(m));
                }
            }
            this.Score = source.Score;
            //source.Password not used!
        }
Ejemplo n.º 2
0
 public string EvaluatePassword(string password)
 {
     Zxcvbn.Result result = this.passwordChecker.EvaluatePassword(password);
     return($"{result.CrackTimeDisplay}!");
 }