mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-04 20:03:40 +00:00
Merge remote-tracking branch 'newpavlov/rand_os' into release/0.4.0
This commit is contained in:
commit
53ba2f3bcc
4 changed files with 5 additions and 8 deletions
|
|
@ -30,7 +30,7 @@ clear_on_drop = { version = "0.2" }
|
|||
|
||||
[dev-dependencies]
|
||||
criterion = "0.2"
|
||||
rand = "0.6"
|
||||
rand_os = "0.1"
|
||||
|
||||
[[bench]]
|
||||
name = "x25519"
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ First, Alice uses `EphemeralSecret::new()` and then
|
|||
|
||||
```rust
|
||||
extern crate x25519_dalek;
|
||||
extern crate rand;
|
||||
extern crate rand_os;
|
||||
|
||||
use x25519_dalek::EphemeralPublic;
|
||||
use x25519_dalek::EphemeralSecret;
|
||||
use rand::OsRng;
|
||||
use rand_os::OsRng;
|
||||
|
||||
let mut alice_csprng = OsRng::new().unwrap();
|
||||
let alice_secret = EphemeralSecret::new(&mut alice_csprng);
|
||||
|
|
|
|||
|
|
@ -14,14 +14,14 @@
|
|||
#[macro_use]
|
||||
extern crate criterion;
|
||||
extern crate curve25519_dalek;
|
||||
extern crate rand;
|
||||
extern crate rand_os;
|
||||
extern crate x25519_dalek;
|
||||
|
||||
use criterion::Criterion;
|
||||
|
||||
use curve25519_dalek::montgomery::MontgomeryPoint;
|
||||
|
||||
use rand::OsRng;
|
||||
use rand_os::OsRng;
|
||||
|
||||
use x25519_dalek::EphemeralPublic;
|
||||
use x25519_dalek::EphemeralSecret;
|
||||
|
|
|
|||
|
|
@ -30,9 +30,6 @@ extern crate curve25519_dalek;
|
|||
|
||||
extern crate rand_core;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate rand;
|
||||
|
||||
mod x25519;
|
||||
|
||||
pub use x25519::*;
|
||||
|
|
|
|||
Loading…
Reference in a new issue