Closed nikhilraojl closed 1 year ago
You're right it doesn't mention the specific feature needed here, although it's actually getrandom
and not std
(though std
will activate it transitively)
Got it. Can we update the example then? Just a simple line saying this requires the feature flag std
Yes, however as I noted the correct feature to enable is getrandom
As there is no getrandom
feature flag on argon2, I have added rand_core
and it worked
> cargo add rand_core -F getrandom
Updating crates.io index
Adding rand_core v0.6.4 to dependencies.
Features:
+ getrandom
- alloc
- serde
- serde1
- std
Is this correct?
Oh sorry, you're right, there is currently no getrandom
feature and only std
will activate it.
To add one, it just needs to activate the getrandom
feature of password-hash
.
The example mentioned in documentation (https://docs.rs/argon2/0.5.1/argon2/index.html#password-hashing) doesn't compile with default feature flags.
It compiles if
std
flag is set.This wasn't very intuitive. Can the example be updated mentioning that the
std
feature flag needs to be set?P.S I am a rust beginner and I may have missed an obvious thing 🙇