mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-10-15 15:00:58 -04:00
Return password quality to keepasshttp client.
This commit is contained in:
parent
75564c8fb5
commit
b432103b82
5 changed files with 26 additions and 1 deletions
|
@ -89,6 +89,22 @@ QString PasswordGenerator::generatePassword() const
|
|||
return password;
|
||||
}
|
||||
|
||||
int PasswordGenerator::getbits() const
|
||||
{
|
||||
QVector<PasswordGroup> groups = passwordGroups();
|
||||
|
||||
int bits = 0;
|
||||
QVector<QChar> passwordChars;
|
||||
Q_FOREACH (const PasswordGroup& group, groups) {
|
||||
bits += group.size();
|
||||
}
|
||||
|
||||
bits *= m_length;
|
||||
|
||||
return bits;
|
||||
}
|
||||
|
||||
|
||||
bool PasswordGenerator::isValid() const
|
||||
{
|
||||
if (m_classes == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue