use random values in benchmark
@@ -47,8 +47,10 @@ mod benchamarks {
#[bench]
fn bench_aes_rand(b: &mut Bencher) {
- let rng = AesRng::new(&[0u8; 16]);
- let mut x = [0u8; 16 * 1024];
+ let rng = AesRng::new(&rand::random::<[u8; 16]>());
+ let mut x = (0..16 * 1024)
+ .map(|_| rand::random::<u8>())
+ .collect::<Vec<u8>>();
b.iter(|| rng.random(&mut x));
}
}
