Skip to content

Conversation

@Szymongib
Copy link
Contributor

Overview

As briefly discussed in #706 this PR:

  • Adds more context to Error::ParamValueInvalid in from of ParamValueError enum.
  • Introduces Error::SaltInvalid.
  • Maps Error::ParamValueInvalid to proper salt error.

Also as discussed in the issue this is a breaking change.

Notes

ParamValueError could be an an Option in ParamValueInvalid: ParamValueInvalid(Option<ParamValueError>) if in some cases we do not want to specify a more detailed error but it might be more cumbersome to handle and I am not sure if there is such need, therefore, I went for implementation without it. Just wanted to highlight it as my knowledge here is limited.

Fixes: #706

@Szymongib Szymongib requested a review from tarcieri August 25, 2021 17:02
@tarcieri
Copy link
Member

Looks good now, thank you!

I will go ahead and merge this with the goal of including it in a breaking password-hash v0.3 release.

@tarcieri tarcieri merged commit 67f2cb4 into RustCrypto:master Aug 25, 2021
@Szymongib Szymongib deleted the feat/add-more-specific-value-error branch August 26, 2021 07:04
@tarcieri tarcieri mentioned this pull request Aug 27, 2021
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

Successfully merging this pull request may close these issues.

Salt with invalid character fails with error SaltToLong

2 participants