mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-07-31 12:31:22 +00:00
Migrate to rand 0.7
This commit is contained in:
@@ -22,8 +22,8 @@ libc = "0.2"
|
||||
pairing = { path = "../pairing" }
|
||||
lazy_static = "1"
|
||||
byteorder = "1"
|
||||
rand_core = "0.4"
|
||||
rand_os = "0.1"
|
||||
rand_core = "0.5"
|
||||
rand_os = "0.2"
|
||||
sapling-crypto = { path = "../sapling-crypto" }
|
||||
zcash_primitives = { path = "../zcash_primitives" }
|
||||
zcash_proofs = { path = "../zcash_proofs" }
|
||||
|
@@ -388,7 +388,7 @@ fn test_gen_r() {
|
||||
#[no_mangle]
|
||||
pub extern "system" fn librustzcash_sapling_generate_r(result: *mut [c_uchar; 32]) {
|
||||
// create random 64 byte buffer
|
||||
let mut rng = OsRng::new().expect("should be able to construct RNG");
|
||||
let mut rng = OsRng;
|
||||
let mut buffer = [0u8; 64];
|
||||
rng.fill_bytes(&mut buffer);
|
||||
|
||||
@@ -858,7 +858,7 @@ pub extern "system" fn librustzcash_sprout_prove(
|
||||
drop(sprout_fs);
|
||||
|
||||
// Initialize secure RNG
|
||||
let mut rng = OsRng::new().expect("should be able to construct RNG");
|
||||
let mut rng = OsRng;
|
||||
|
||||
let proof = create_random_proof(js, ¶ms, &mut rng).expect("proving should not fail");
|
||||
|
||||
|
@@ -13,7 +13,7 @@ use {
|
||||
#[test]
|
||||
fn test_key_agreement() {
|
||||
let params = JubjubBls12::new();
|
||||
let mut rng = OsRng::new().unwrap();
|
||||
let mut rng = OsRng;
|
||||
|
||||
// Create random viewing key
|
||||
let vk = ViewingKey::<Bls12> {
|
||||
|
Reference in New Issue
Block a user