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

Clean up error handling in WalletKeyOpt functional options #29

Open
lrettig opened this issue Apr 5, 2023 · 0 comments
Open

Clean up error handling in WalletKeyOpt functional options #29

lrettig opened this issue Apr 5, 2023 · 0 comments

Comments

@lrettig
Copy link
Member

lrettig commented Apr 5, 2023

          Exiting the program in case the functional options have been defined in the wrong order is a bit extrem imo

I would prefer one of the following:

  1. WithPdkdf2Password also takes a salt and the user must not also call WithSalt
  2. WalletKey has a verify method that is called after applying all functional options that verifies a correct state and returns an error if something is missing (e.g. no salt provided)

Originally posted by @fasmat in #20 (comment)

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

1 participant