APPinViewController icon indicating copy to clipboard operation
APPinViewController copied to clipboard

working with hashed pins

Open jpaas opened this issue 12 years ago • 2 comments

Thanks for this cocoapod, it looks great and is making my life so much easier!

One thing I'm doing is storing the hashed pin value as part of a user's account, for obvious reasons. But the current design doesn't really allow me to hook in anywhere to hash the entered pin before comparison, or to externalize the comparison.

jpaas avatar Nov 05 '13 21:11 jpaas

Hi, jpaas, thanks for the feedback. I see you problem, we'll add optional delegate method (naming can change) in next release:

  • (BOOL)pinViewController:(APPinViewController *)controller compareEnteredPin:(NSString *)pinCode

Here you can hash pinCode with your algorithm and match it with your stored pin. Return YES if they match and NO otherwise.

Krivoblotsky avatar Nov 08 '13 09:11 Krivoblotsky

Thanks Serg. In the meantime I've found a workaround by overriding @verifyPinWithEntered: and re-synthesizing failedAttempts to give me access to _failedAttempts.

jpaas avatar Nov 08 '13 13:11 jpaas