Password generator now allows to require a character form each character group

This commit is contained in:
Michael Starke
2019-01-31 13:39:56 +01:00
parent 6a1f8e0472
commit ed0a57a607
4 changed files with 80 additions and 40 deletions

View File

@@ -56,6 +56,7 @@ typedef NS_OPTIONS(NSUInteger, MPPasswordCharacterFlags) {
+ (NSString *)passwordWithDefaultSettings;
+ (NSUInteger)minimumPasswordLengthWithCharacterSet:(MPPasswordCharacterFlags)characterSet customCharacters:(NSString *)customCharacter ensureOccurance:(BOOL)ensureOccurance;
/**
* @return returns a random character from the string
*/
@@ -84,6 +85,6 @@ typedef NS_OPTIONS(NSUInteger, MPPasswordCharacterFlags) {
*
* @return entropy of the receiver as bits
*/
- (CGFloat)entropyWhithPossibleCharacterSet:(MPPasswordCharacterFlags)allowedCharacters andCustomCharacters:(NSString *)customCharacters;
- (CGFloat)entropyWhithCharacterSet:(MPPasswordCharacterFlags)characterSet customCharacters:(NSString *)customCharacters ensureOccurance:(BOOL)ensureOccurance;
@end