Repository: RustCrypto/password-hashes (language: rust)

Issue:
Password hashing example does not compile due to missing feature
The following argon2 password hashing snippet from [the docs](https://docs.rs/argon2/0.5.3/argon2/#password-hashing) fails to compile

```rust
use argon2::{
    password_hash::{
        rand_core::OsRng,
        PasswordHash, PasswordHasher, PasswordVerifier, SaltString
    },
    Argon2
};
```
```
error[E0432]: unresolved import `argon2::password_hash::rand_core::OsRng`
  --> src/main.rs:2:21
   |
2  |     password_hash::{rand_core::OsRng, PasswordHash, PasswordHasher, PasswordVerifier, SaltString},
   |                     ^^^^^^^^^^^^^^^^ no `OsRng` in the root
   |
```

From what I could figure out, the `argon2` crate re-exports `password-hash`, which re-exports `rand_core` since the ["password-hash/rand_core" feature is enabled.](https://github.com/RustCrypto/password-hashes/blob/2b6f9688625db3db798b35c8a209e4799bb60e11/argon2/Cargo.toml#L38C1-L38C35)

But to use `OsRng`, you also need the ["os_rng" feature on the `rand_core` crate](https://github.com/rust-random/rand/blob/9f05e22afb6031d32f36cd927592e7e49b668d64/rand_core/Cargo.toml#L29), that seems to be missing.

Am i missing something o.0?

# Reproduction steps

- Create a new cargo binary project
- Paste the import into main.rs
- `cargo build`

# Details

- I'm using the latest stable version of argon2: 0.5.3
- I'm using the latest version of rust (rustc 1.83.0)


Discussion / hints:
You can get `OsRng` by enabling the `std` crate feature on `argon2`. It's probably worth to mention this in the docs.
Ah, that did the trick. Yea it would be useful to mention it if possible!
Thank you!


Fix patch:
diff --git a/argon2/src/lib.rs b/argon2/src/lib.rs
index cfbd1f1a..3f1b8e9c 100644
--- a/argon2/src/lib.rs
+++ b/argon2/src/lib.rs
@@ -38,6 +38,7 @@
 //! # fn main() -> Result<(), Box<dyn std::error::Error>> {
 //! use argon2::{
 //!     password_hash::{
+//!         // `OsRng` requires enabled `std` crate feature
 //!         rand_core::OsRng,
 //!         PasswordHash, PasswordHasher, PasswordVerifier, SaltString
 //!     },


Test patch: