Esempio n. 1
0
        /// <summary>
        /// Creates a random password using the policy.
        /// </summary>
        /// <param name="fallbackPolicy">Policy to use, if <see cref="Flags"/> is <see cref="PwPolicyFlags.None"/>.</param>
        /// <returns>A new random password.</returns>
        public string MakeRandomPassword(PwPolicy fallbackPolicy)
        {
            var policy = this;

            if (Flags == PwPolicyFlags.None)
            {
                policy = fallbackPolicy;
            }
            var pcp = new PasswordCharPool(policy);

            return(pcp.MakePassword());
        }
Esempio n. 2
0
 public PasswordCharPool(PwPolicy policy)
 {
 }