Fixed bug in entropy calculation when using mixed character sets. Added enforce groups button to UI

This commit is contained in:
Michael Starke
2019-01-31 13:13:05 +01:00
parent 6068260abb
commit 6a1f8e0472
4 changed files with 106 additions and 64 deletions

View File

@@ -77,13 +77,13 @@ typedef NS_OPTIONS(NSUInteger, MPPasswordCharacterFlags) {
/**
* Calculates the entropy of the receiver based on the allowed characters. The calculation considers the characters chosen randomly.
* If the password supplied was not created randomly based on the full character set, the calculated entropy is NOT correct.
* Do NOT use this method to estimate unknown passwords
* Do NOT use this method to estimate passwords with unknown alphabet
*
* @param allowedCharacters set of allowed Characters
* @param customCharacters alternative string of unique allowed characters (String is not stripped of duplicates!)
* @param customCharacters additional custom string of allowed characters.
*
* @return entropy of the receiver as bits
*/
- (CGFloat)entropyWhithPossibleCharacterSet:(MPPasswordCharacterFlags)allowedCharacters orCustomCharacters:(NSString *)customCharacters;
- (CGFloat)entropyWhithPossibleCharacterSet:(MPPasswordCharacterFlags)allowedCharacters andCustomCharacters:(NSString *)customCharacters;
@end