Reputation: 12946
Looking for suggestions on a password strength checker for objective-c. I did some googling and didn't find any hits, neither here on SO. I could write one up but thought I'd check here first - has anyone implemented one?
Upvotes: 8
Views: 6244
Reputation: 1400
Mattt Thompson created a library for this (see this answer). It's the best option I've found.
https://github.com/mattt/Navajo
Upvotes: 1
Reputation: 290
I have created a method for this purpose. I know this is old question, but I think it actual for now to, so here is the url of code:
https://github.com/ruben-samsonyan/PasswordStrengthChecker/blob/master/passwordChecker.m
Upvotes: 2
Reputation: 33592
I am only aware of two half-decent password strength estimators: zxcvbn (in CoffeeScript, compiles to JavaScript) and Passfault (in Java, appears to be intended as a webapp).
(Actually, that's is a slight lie; there was one in a PhD thesis I read a while back, but I'm not sure where I put the link.)
Every other password "strength" checker I've looked at in any detail has been flawed, often deeply flawed (e.g. GRC's "haystacks" assumes a very dumb bruteforce; even open-source password crackers are much more sophisticated) — the other day, the password strength meter of a large UK loyalty card scheme told me that "1Aa" was a "GOOD" password ("GOOD" is the highest rating).
(The other problem is that the password strength required depends on how it's being used: a 48-bit password like "W1mCj6B1" is fine for a Google account but incredibly weak as a Windows/Mac login password or a WPA passphrase.)
I don't think you're likely to find a decent one in Objective-C, given their rarity. If you do end up writing one, I have a few suggestions:
NSWidthInsensitiveSearch
and NSDiacriticInsensitiveSearch
) and jumping through some hoops to map ı/İ/ß to i/I/ss. There's also kCFStringTransformToLatin
which promises to transliterate most scripts to the Latin alphabet. This bit doesn't need to be in C because it'll heavily depend on Unicode libraries, although you may be able to use ICU.Finally, password strength estimation is a hard problem. Guess the strength of
2jmj7l5rSw0yVb_vlWAYkK_YBwk
. Now ask Google.
Upvotes: 7