コード例 #1
0
        /// <summary>
        /// According to lenght of password generates a new password or gives an error message.
        /// </summary>
        /// <param name="lenght"></param>
        /// <returns></returns>
        public string GeneratePassword(int lenght = 10)
        {
            string password = "******";

            if (RandomPasswordGenerator.ValidateLenght(lenght))
            {
                password = PasswordGenerator.GeneratePassword(true, true, true, true, lenght);
            }

            return(password);
        }
コード例 #2
0
 public Sistema()
 {
     PasswordGenerator = new RandomPasswordGenerator();
 }