From 9ab09897bd34723d1d33b893079d0142615f2438 Mon Sep 17 00:00:00 2001 From: Andreas Fackler Date: Tue, 18 Dec 2018 14:44:50 +0100 Subject: [PATCH] Update docs.rs link. --- Cargo.toml | 2 +- src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7203dc9..737e718 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ log = "0.4.5" memsec = "0.5.4" pairing = { version = "0.14.2", features = ["u128-support"] } rand = "0.6.1" -rand04_compat = { git = "https://github.com/poanetwork/rand04_compat" } +rand04_compat = "0.1.0" rand_chacha = "0.1.0" serde = "1.0.80" serde_derive = "1.0.80" diff --git a/src/lib.rs b/src/lib.rs index 6f01263..b7863b6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -321,7 +321,7 @@ impl SecretKey { /// Creates a new random instance of `SecretKey`. If you want to use/define your own random /// number generator, you should use the constructor: `SecretKey::rand()`. If you do not need /// to specify your own RNG, you should use the `SecretKey::random()` constructor, which uses - /// [`rand::thead_rng()`](https://docs.rs/rand/0.4.3/rand/fn.thread_rng.html) internally as + /// [`rand::thead_rng()`](https://docs.rs/rand/0.6.1/rand/fn.thread_rng.html) internally as /// its RNG. pub fn random() -> Self { rand::random() @@ -615,7 +615,7 @@ fn xor_with_hash(g1: G1, bytes: &[u8]) -> Vec { let digest = sha3_256(g1.into_affine().into_compressed().as_ref()); let mut rng = ChaChaRng::from_seed(digest); let xor = |(a, b): (u8, &u8)| a ^ b; - rng.gen_iter04().zip(bytes).map(xor).collect() + rng.sample_iter(&Standard).zip(bytes).map(xor).collect() } use std::borrow::Borrow;