diff options
Diffstat (limited to 'src/core/PasswordGenerator.h')
-rw-r--r-- | src/core/PasswordGenerator.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/core/PasswordGenerator.h b/src/core/PasswordGenerator.h index 22627d25b..308142563 100644 --- a/src/core/PasswordGenerator.h +++ b/src/core/PasswordGenerator.h @@ -57,32 +57,19 @@ public: public: PasswordGenerator(); - double estimateEntropy(const QString& password); void setLength(int length); void setCharClasses(const CharClasses& classes); void setFlags(const GeneratorFlags& flags); + void setAdditionalChars(const QString& chars); void setExcludedChars(const QString& chars); bool isValid() const; QString generatePassword() const; - static const int DefaultLength = 16; + static const int DefaultLength = 32; + static const char* DefaultAdditionalChars; static const char* DefaultExcludedChars; - static constexpr bool DefaultLower = (DefaultCharset & LowerLetters) != 0; - static constexpr bool DefaultUpper = (DefaultCharset & UpperLetters) != 0; - static constexpr bool DefaultNumbers = (DefaultCharset & Numbers) != 0; - static constexpr bool DefaultSpecial = (DefaultCharset & SpecialCharacters) != 0; - static constexpr bool DefaultAdvancedMode = (DefaultFlags & AdvancedMode) != 0; - static constexpr bool DefaultBraces = (DefaultCharset & Braces) != 0; - static constexpr bool DefaultPunctuation = (DefaultCharset & Punctuation) != 0; - static constexpr bool DefaultQuotes = (DefaultCharset & Quotes) != 0; - static constexpr bool DefaultDashes = (DefaultCharset & Dashes) != 0; - static constexpr bool DefaultMath = (DefaultCharset & Math) != 0; - static constexpr bool DefaultLogograms = (DefaultCharset & Logograms) != 0; - static constexpr bool DefaultEASCII = (DefaultCharset & EASCII) != 0; - static constexpr bool DefaultLookAlike = (DefaultFlags & ExcludeLookAlike) != 0; - static constexpr bool DefaultFromEveryGroup = (DefaultFlags & CharFromEveryGroup) != 0; private: QVector<PasswordGroup> passwordGroups() const; @@ -91,6 +78,7 @@ private: int m_length; CharClasses m_classes; GeneratorFlags m_flags; + QString m_additional; QString m_excluded; Q_DISABLE_COPY(PasswordGenerator) |