Bitwarden-app-android-iphon.../src/Core/Models/Domain/PasswordGeneratorPolicyOpti...

33 lines
1.0 KiB
C#
Raw Normal View History

namespace Bit.Core.Models.Domain
{
public class PasswordGeneratorPolicyOptions
{
2020-03-17 02:07:54 +01:00
public string DefaultType { get; set; } = string.Empty;
public int MinLength { get; set; }
public bool UseUppercase { get; set; }
public bool UseLowercase { get; set; }
public bool UseNumbers { get; set; }
public int NumberCount { get; set; }
public bool UseSpecial { get; set; }
public int SpecialCount { get; set; }
public int MinNumberOfWords { get; set; }
public bool Capitalize { get; set; }
public bool IncludeNumber { get; set; }
2020-03-17 02:07:54 +01:00
public bool InEffect()
{
2020-03-17 02:07:54 +01:00
return DefaultType != string.Empty ||
MinLength > 0 ||
NumberCount > 0 ||
SpecialCount > 0 ||
UseUppercase ||
UseLowercase ||
UseNumbers ||
UseSpecial ||
MinNumberOfWords > 0 ||
Capitalize ||
IncludeNumber;
}
}
}