Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

working with hashed pins #1

Open
jpaas opened this issue Nov 5, 2013 · 2 comments
Open

working with hashed pins #1

jpaas opened this issue Nov 5, 2013 · 2 comments

Comments

@jpaas
Copy link

jpaas commented Nov 5, 2013

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.

@Krivoblotsky
Copy link
Contributor

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.

@jpaas
Copy link
Author

jpaas commented Nov 8, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants