feat: update dependencies

This commit is contained in:
2023-08-26 02:23:18 +08:00
parent e8b5167490
commit 11aaa45456
3 changed files with 38 additions and 54 deletions

View File

@@ -8,7 +8,7 @@ use std::iter::repeat;
use std::num;
use getopts::Options;
use rand::{OsRng, Rng};
use rand::RngCore;
use rustc_serialize::base64::{self, FromBase64, ToBase64};
use gf256::Gf256;
@@ -121,7 +121,7 @@ fn secret_share(src: &[u8], k: u8, n: u8) -> io::Result<Vec<Vec<u8>>> {
}
let mut col_in = new_vec(k as usize, 0u8);
let mut col_out = Vec::with_capacity(n as usize);
let mut osrng = OsRng::new()?;
let mut osrng = rand::thread_rng();
for (c, &s) in src.iter().enumerate() {
col_in[0] = s;
osrng.fill_bytes(&mut col_in[1..]);