Skip to content

Clean up error handling in WalletKeyOpt functional options #29

@lrettig

Description

@lrettig
          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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions