mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 21:42:32 +00:00
Merge pull request #453 from magebarf/master
This commit is contained in:
@@ -144,6 +144,9 @@
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||
<font key="font" metaFont="cellTitle"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="_toggleCharacters:" target="-2" id="5CP-8c-RKX"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<animations/>
|
||||
|
||||
@@ -106,13 +106,13 @@ static NSString *mergeWithoutDuplicates(NSString* baseCharacters, NSString* cust
|
||||
|
||||
- (CGFloat)entropyWhithPossibleCharacterSet:(MPPasswordCharacterFlags)allowedCharacters orCustomCharacters:(NSString *)customCharacters {
|
||||
NSString *characters = nil;
|
||||
if(nil == customCharacters) {
|
||||
characters = allowedCharactersString(allowedCharacters);
|
||||
if([[NSUserDefaults standardUserDefaults] boolForKey:kMPSettingsKeyPasswordUseCustomString] && nil != customCharacters) {
|
||||
characters = mergeWithoutDuplicates(
|
||||
allowedCharactersString(allowedCharacters),
|
||||
customCharacters);
|
||||
}
|
||||
else {
|
||||
NSString *characters = mergeWithoutDuplicates(
|
||||
allowedCharactersString(allowedCharacters),
|
||||
customCharacters);
|
||||
characters = allowedCharactersString(allowedCharacters);
|
||||
}
|
||||
CGFloat alphabetCount = characters.length;
|
||||
CGFloat passwordLength = self.length;
|
||||
|
||||
Reference in New Issue
Block a user