Return password quality to keepasshttp client.

This commit is contained in:
Keith Bennett 2014-03-23 01:13:27 +00:00
parent 75564c8fb5
commit b432103b82
5 changed files with 26 additions and 1 deletions

View file

@ -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) {