Update docs.rs link.

master
Andreas Fackler 6 years ago committed by Andreas Fackler
parent 8b6fa87cdc
commit 9ab09897bd
  1. 2
      Cargo.toml
  2. 4
      src/lib.rs

@ -28,7 +28,7 @@ log = "0.4.5"
memsec = "0.5.4" memsec = "0.5.4"
pairing = { version = "0.14.2", features = ["u128-support"] } pairing = { version = "0.14.2", features = ["u128-support"] }
rand = "0.6.1" rand = "0.6.1"
rand04_compat = { git = "https://github.com/poanetwork/rand04_compat" } rand04_compat = "0.1.0"
rand_chacha = "0.1.0" rand_chacha = "0.1.0"
serde = "1.0.80" serde = "1.0.80"
serde_derive = "1.0.80" serde_derive = "1.0.80"

@ -321,7 +321,7 @@ impl SecretKey {
/// Creates a new random instance of `SecretKey`. If you want to use/define your own random /// 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 /// 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 /// 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. /// its RNG.
pub fn random() -> Self { pub fn random() -> Self {
rand::random() rand::random()
@ -615,7 +615,7 @@ fn xor_with_hash(g1: G1, bytes: &[u8]) -> Vec<u8> {
let digest = sha3_256(g1.into_affine().into_compressed().as_ref()); let digest = sha3_256(g1.into_affine().into_compressed().as_ref());
let mut rng = ChaChaRng::from_seed(digest); let mut rng = ChaChaRng::from_seed(digest);
let xor = |(a, b): (u8, &u8)| a ^ b; 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; use std::borrow::Borrow;

Loading…
Cancel
Save