-
Notifications
You must be signed in to change notification settings - Fork 157
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
rand_core
v0.9 support
#466
Comments
With the possible addition of rust-lang/rust#130703 it would be nice to avoid hard-coding For example, some functions could provide a callback where the user is responsible for providing entropy. pub fn encrypt(msg: &[u8], cb: impl FnOnce(&mut [u8])) -> Result<Vec<u8>> {
...
}
let mut rng = thread_rng();
encrypt(&[1, 2, 3, 4], |slice| {
rng.fill_bytes(slice);
})?; |
Related to RustCrypto/traits#1642 |
@c410-f3r the nice thing about In the next set of releases of the https://github.com/rustcrypto/traits crates, we're also providing (and pushing people towards) a non-parameterized random generation APIs which avoids compatibility problems between crate versions and explicit RNGs: RustCrypto/traits#1371 |
rand_core
v0.9 support
So with v 0.9.0 for rand and rand_core, will get a error like 'error[E0277]: the trait bound
ThreadRng: CryptoRngCore
is not satisfied".The text was updated successfully, but these errors were encountered: