Skip to content

paulorogeriota/Complexify-ObjC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Complexify-ObjC

Objective-C port of Dan Palmer's jQuery Complexify plugin. It powers Padlock.

"Complexify aims to provide a good measure of password complexity for websites apps to use both for giving hints to users in the form of strength bars security level, and for casually enforcing a minimum complexity for security reasons."

Usage

Computing password complexity in the main queue

+ (void)checkComplexityOfPassword:(NSString *)password completionHandler:(ComplexifyCallback)completionHandler;

[Complexify checkComplexityOfPassword:@"foobar"
			completionHandler:^(BOOL valid, CGFloat complexity){
				/*
					valid :
						BOOL
						YES | NO

					complexity :
						CGFloat
						0 <= complexity <= 100
				*/
			}];

}];

Computing password complexity in the background queue (callback block will be in the main queue)

+ (void)checkComplexityInBackgroundOfPassword:(NSString *)password completionHandler:(ComplexifyCallback)completionHandler;

[Complexify checkComplexityInBackgroundOfPassword:@"foobar"
			completionHandler:^(BOOL valid, CGFloat complexity){
				/*
					valid :
						BOOL
						YES | NO

					complexity :
						CGFloat
						0 <= complexity <= 100
				*/
			}];

}];

About

Objective-C port of Dan Palmer's Complexify

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Objective-C 100.0%