Navajo 0.0.1

Navajo 0.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Mattt Thompson.


Downloads

Total76,722
Week0
Month0

Installs

Apps342
Test Targets53
powered by Segment

GitHub

Stars839
Watchers19
Forks59
Issues0
Contributors1
Pull Requests2

Code

Files2
LOCLines of Code 333



Navajo 0.0.1

Password Validator & Strength Evaluator

Navajo

Navajo is named in honor of the famed code talkers of the Second World War.

Usage

Validating Password

NSString *password = @"abc123"
NJOPasswordValidator *validator = [NJOPasswordValidator standardValidator];

NSArray *failingRules = nil;
BOOL isValid = [validator validatePassword:password
                              failingRules:&failingRules];

if (!isValid) {
    for (id <NJOPasswordRule> rule in failingRules) {
        NSLog(@"- %@", [rule localizedErrorDescription]);
    }
}

Available Validation Rules

  • Allowed Characters
  • Required Characters (e.g. lowercase, uppercase, decimal, symbol)
  • Non-Dictionary Word
  • Minimum / Maximum Length
  • Predicate Match
  • Regular Expression Match
  • Block Evaluation

Evaluating Password Strength

Password strength is evaluated in terms of information entropy.

NJOPasswordStrength strength = [NJOPasswordStrengthEvaluator strengthOfPassword:password];
NSLog(@"%@", [NJOPasswordStrengthEvaluator localizedStringForPasswordStrength:strength]);

Contact

Mattt Thompson @mattt

License

Navajo is available under the MIT license. See the LICENSE file for more info.