mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-22 02:09:22 +00:00
Entropy is now calculated for Custom Alphabets in Password Generator View
Custom String in Password Generator View are now filtered to only include unique characters
This commit is contained in:
@@ -27,9 +27,16 @@
|
||||
originalString:(NSString *)origString
|
||||
originalSelectedRange:(NSRange)origSelRange
|
||||
errorDescription:(NSString **)error {
|
||||
return YES;
|
||||
NSInteger newLenght = [*partialStringPtr length];
|
||||
NSInteger oldLenght = [origString length];
|
||||
if( oldLenght == 0 || (newLenght < oldLenght)) {
|
||||
return YES;
|
||||
}
|
||||
|
||||
NSCharacterSet *newCharacterSet = [NSCharacterSet characterSetWithCharactersInString:*partialStringPtr];
|
||||
NSCharacterSet *oldCharacterSet = [NSCharacterSet characterSetWithCharactersInString:origString];
|
||||
|
||||
return ![oldCharacterSet isSupersetOfSet:newCharacterSet];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user