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

More flexible PIN entry #28

Open
LouisBrunner opened this issue Mar 19, 2020 · 0 comments
Open

More flexible PIN entry #28

LouisBrunner opened this issue Mar 19, 2020 · 0 comments

Comments

@LouisBrunner
Copy link
Contributor

@LouisBrunner LouisBrunner commented Mar 19, 2020

Hi @paultag, thanks a lot for this nice library!

In our current project, we sometimes use your package in an automated fashion and inject PIN/Management Key through the Options struct and that works perfectly.

However we also have a CLI/interactive tool where we prompt users for PIN entry. We only want to prompt when the PIN is required, so we can't set all the PIN, PUK, Management Key at start up. In such case it's a bit more difficult to integrate, we currently Close and New the card every-time so we can pass new options with new PINs, messy.

I am fine implementing a way to allow to request PIN entry more dynamically, but I'd like your opinion first on how this should look like.

I see several options:

  • Take an interface as argument in New so we can replace GetPIN, GetPUK, etc and do all our PIN entry logic there, most people could still use the normal Options as before so it is fully backward compatible
  • Ability to pass a *Options to New so we can change PIN, PUK, etc without having to recreate the whole key (not backward compatible and still fairly messy as we have to guess when you need the PIN, etc)
  • Some other options I have missed?

Looking forward to your feedback!

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.