File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -53,4 +53,5 @@ required-features = ["hazmat"]
53
53
[[example ]]
54
54
name = " ringct"
55
55
crate-type = [" staticlib" ]
56
+ required-features = [" rand" ]
56
57
test = true
Original file line number Diff line number Diff line change 12
12
mod test {
13
13
use curve25519_dalek:: { RistrettoPoint , Scalar } ;
14
14
use merlin:: Transcript ;
15
- use rand_chacha:: ChaCha12Rng ;
16
- use rand_core:: SeedableRng ;
15
+ use rand_core:: OsRng ;
17
16
use triptych:: parallel:: * ;
18
17
19
18
#[ allow( non_snake_case) ]
20
19
#[ test]
21
20
fn ringct ( ) {
22
- // In practice you should use an actual random number generator; this is just for easier testing
23
- let mut rng = ChaCha12Rng :: seed_from_u64 ( 8675309 ) ;
21
+ // It's important to use a cryptographically-secure random number generator!
22
+ let mut rng = OsRng ;
24
23
25
24
// Parameters that will define the number of outputs used in the proof: 2^4 == 16
26
25
let n = 2 ;
You can’t perform that action at this time.
0 commit comments