Adding EASCII character class.

This commit is contained in:
Louis-Bertrand Varin 2017-02-25 17:41:37 -05:00 committed by thez3ro
parent c40a7a5265
commit fa7c945363
No known key found for this signature in database
GPG Key ID: F628F9E41DD7C073
2 changed files with 18 additions and 1 deletions

View File

@ -195,6 +195,22 @@ QVector<PasswordGroup> PasswordGenerator::passwordGroups() const
passwordGroups.append(group);
}
if (m_classes & EASCII) {
PasswordGroup group;
for (int i = 128; i <= 169; i++) {
group.append(i);
}
for (int i = 171; i <= 254; i++) {
if ((m_flags & ExcludeLookAlike) && (i == 249)) { // "﹒"
continue;
}
group.append(i);
}
passwordGroups.append(group);
}
return passwordGroups;
}

View File

@ -32,7 +32,8 @@ public:
LowerLetters = 0x1,
UpperLetters = 0x2,
Numbers = 0x4,
SpecialCharacters = 0x8
SpecialCharacters = 0x8,
EASCII = 0x16
};
Q_DECLARE_FLAGS(CharClasses, CharClass)