135
1
//Written by Paul Seal. Licensed under MIT. Free for private and commercial uses.
2
3
using System;
4
using System.Text.RegularExpressions;
5
using CodeShare.Library.Passwords;
6
7
public class Program
8
{
9
public static void Main()
10
{
11
bool includeLowercase = true;
12
bool includeUppercase = true;
13
bool includeNumeric = true;
14
bool includeSpecial = false;
15
bool includeSpaces = false;
16
int lengthOfPassword = 16;
17
18
string password = PasswordGenerator.GeneratePassword(includeLowercase, includeUppercase, includeNumeric, includeSpecial, includeSpaces, lengthOfPassword);
19
20
while(!PasswordGenerator.PasswordIsValid(includeLowercase, includeUppercase, includeNumeric, includeSpecial, includeSpaces, password))
21
{
22
password = PasswordGenerator.GeneratePassword(includeLowercase, includeUppercase, includeNumeric, includeSpecial, includeSpaces, lengthOfPassword);
23
}
24
Cached Result