mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 03:32:40 +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"/>
|
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES" changeBackground="YES" changeGray="YES"/>
|
||||||
<font key="font" metaFont="cellTitle"/>
|
<font key="font" metaFont="cellTitle"/>
|
||||||
</buttonCell>
|
</buttonCell>
|
||||||
|
<connections>
|
||||||
|
<action selector="_toggleCharacters:" target="-2" id="5CP-8c-RKX"/>
|
||||||
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
</subviews>
|
</subviews>
|
||||||
<animations/>
|
<animations/>
|
||||||
|
|||||||
@@ -106,13 +106,13 @@ static NSString *mergeWithoutDuplicates(NSString* baseCharacters, NSString* cust
|
|||||||
|
|
||||||
- (CGFloat)entropyWhithPossibleCharacterSet:(MPPasswordCharacterFlags)allowedCharacters orCustomCharacters:(NSString *)customCharacters {
|
- (CGFloat)entropyWhithPossibleCharacterSet:(MPPasswordCharacterFlags)allowedCharacters orCustomCharacters:(NSString *)customCharacters {
|
||||||
NSString *characters = nil;
|
NSString *characters = nil;
|
||||||
if(nil == customCharacters) {
|
if([[NSUserDefaults standardUserDefaults] boolForKey:kMPSettingsKeyPasswordUseCustomString] && nil != customCharacters) {
|
||||||
characters = allowedCharactersString(allowedCharacters);
|
characters = mergeWithoutDuplicates(
|
||||||
|
allowedCharactersString(allowedCharacters),
|
||||||
|
customCharacters);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
NSString *characters = mergeWithoutDuplicates(
|
characters = allowedCharactersString(allowedCharacters);
|
||||||
allowedCharactersString(allowedCharacters),
|
|
||||||
customCharacters);
|
|
||||||
}
|
}
|
||||||
CGFloat alphabetCount = characters.length;
|
CGFloat alphabetCount = characters.length;
|
||||||
CGFloat passwordLength = self.length;
|
CGFloat passwordLength = self.length;
|
||||||
|
|||||||
Reference in New Issue
Block a user