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

v4_2 is a misuse of Cargo features. #10

Closed
Lymia opened this issue Apr 16, 2024 · 2 comments · Fixed by #13
Closed

v4_2 is a misuse of Cargo features. #10

Lymia opened this issue Apr 16, 2024 · 2 comments · Fixed by #13
Assignees
Labels
enhancement New feature or request

Comments

@Lymia
Copy link
Contributor

Lymia commented Apr 16, 2024

If two crates depend on wyrand, and one sets v4_2 and the other doesn't, the semantics of Cargo features will cause both to use the v4.2 hash codes. This could be very bad for crates that depend on consistent hashing and were built for the v4 hashes. It'd probably be better to either drop support for v4 or make it two separate modules.

@Bluefinger
Copy link
Owner

The v4.2/v4 versions affect not just the hasher, but the wyrand module as well. However, I was intending on moving to v4.2 on a major version to deprecate v4, so what I might do is just accelerate with that plan given v4.2 is meant to have better quality entropy output than v4 anyway.

@Bluefinger
Copy link
Owner

@Lymia Feel free to take a look at #13 , which should resolve the issues with the resolver by splitting the two implementations into separate modules (also some nice things to ensure one can't mistakenly use parts of one with the other).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants