Skip to content

Commit

Permalink
Enable alloc feature of password-hash if enabled for argon2/balloon-h…
Browse files Browse the repository at this point in the history
…ash (#422)

This commit enables the `password-hash/alloc` feature if the
`argon2/alloc` or `balloon-hash/alloc` features are enabled.

Prior to this commit, if a user adds argon2 as a dependency with the
`alloc` feature enabled, but not the `std` feature (which is the case
with the default feature set), then the `alloc` feature of
`password-hash` is not enabled. This means that feature-gated types such
as `PasswordHashString` are not available in the `password-hash`
re-export, so users wishing to use these types will have to add
`password-hash` as a separate dependency.
  • Loading branch information
tom25519 committed Jun 12, 2023
1 parent dc23aa1 commit 64d7004
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion argon2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ password-hash = { version = "0.5", features = ["rand_core"] }

[features]
default = ["alloc", "password-hash", "rand"]
alloc = []
alloc = ["password-hash/alloc"]
std = ["alloc", "password-hash/std"]

rand = ["password-hash/rand_core"]
Expand Down
2 changes: 1 addition & 1 deletion balloon-hash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ sha2 = "0.10"

[features]
default = ["alloc", "password-hash", "rand"]
alloc = []
alloc = ["password-hash/alloc"]
parallel = ["rayon", "std"]
rand = ["password-hash/rand_core"]
std = ["alloc", "password-hash/std"]
Expand Down

0 comments on commit 64d7004

Please sign in to comment.