Сhanged minimum and maximum password length to 4 and 256

This commit is contained in:
Alexander 2019-12-11 16:21:41 +02:00
parent 0b04274ad0
commit bcba67909a
No known key found for this signature in database
GPG key ID: 1F83313BFEB322E9

View file

@ -131,7 +131,7 @@ private void PasswordGeneratorFrom_FormClosing(object sender, FormClosingEventAr
}
try
{
if (Enumerable.Range(8, 128).Contains(int.Parse(passwordLengthTextBox.Text)))
if (Enumerable.Range(4, 256).Contains(int.Parse(passwordLengthTextBox.Text)))
{
settings.passwordGeneratorLength = passwordLengthTextBox.Text;
}
@ -151,7 +151,7 @@ private void PasswordValidation(object sender, EventArgs e)
try
{
if (!Enumerable.Range(1, 1000).Contains(int.Parse(numberOfStringsTextBox.Text)) |
!Enumerable.Range(8, 128).Contains(int.Parse(passwordLengthTextBox.Text)) |
!Enumerable.Range(4, 256).Contains(int.Parse(passwordLengthTextBox.Text)) |
!lowercaseCheckBox.Checked &
!uppercaseCheckBox.Checked &
!numericCheckBox.Checked &