summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2022-08-05 12:08:10 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2022-08-05 12:08:10 +0200
commitb587add3de8872505d0b3406847c26c78cc2f4ad (patch)
treec7248be6d03f8d1c1ddc401fc4247de277f59a9f
parentf0c2584d89d3652fff8514eefb46724569841f77 (diff)
openpgp: Undo renaming of rand dependency.nora/rand07
-rw-r--r--openpgp/Cargo.toml6
-rw-r--r--openpgp/src/crypto/backend/rust.rs4
-rw-r--r--openpgp/src/crypto/backend/rust/asymmetric.rs2
-rw-r--r--openpgp/src/crypto/backend/rust/ecdh.rs2
4 files changed, 7 insertions, 7 deletions
diff --git a/openpgp/Cargo.toml b/openpgp/Cargo.toml
index f9ce98ee..4e4f1a16 100644
--- a/openpgp/Cargo.toml
+++ b/openpgp/Cargo.toml
@@ -62,7 +62,7 @@ idea = { version = "0.3.0", optional = true }
md-5 = { version = "0.9.1", optional = true }
num-bigint-dig = { version = "0.6", default-features = false, optional = true }
p256 = { version = "0.8", optional = true, features = ["ecdh", "ecdsa"] }
-rand07 = { package = "rand", version = "0.7.3", optional = true }
+rand = { version = "0.7.3", optional = true }
rand_core = { version = "0.6", optional = true }
ripemd160 = { version = "0.9.1", optional = true }
rsa = { version = "0.3.0", optional = true }
@@ -79,7 +79,7 @@ winapi = { version = "0.3.8", default-features = false, features = ["bcrypt"], o
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
chrono = { version = "0.4.10", default-features = false, features = ["std", "wasmbind"] }
getrandom = { version = "0.2", features = ["js"] }
-rand07 = { package = "rand", version = "0.7", features = ["wasm-bindgen"] }
+rand = { version = "0.7", features = ["wasm-bindgen"] }
[build-dependencies]
lalrpop = { version = ">=0.17", default-features = false }
@@ -96,7 +96,7 @@ default = ["compression", "crypto-nettle"]
crypto-nettle = ["nettle"]
crypto-rust = [
"aes", "block-modes", "block-padding", "blowfish", "cast5", "cipher", "des",
- "digest", "eax", "ed25519-dalek", "generic-array", "idea", "md-5", "num-bigint-dig", "rand07",
+ "digest", "eax", "ed25519-dalek", "generic-array", "idea", "md-5", "num-bigint-dig", "rand",
"ripemd160", "rsa", "sha-1", "sha2", "twofish", "typenum", "x25519-dalek", "p256",
"rand_core", "rand_core/getrandom", "ecdsa"
]
diff --git a/openpgp/src/crypto/backend/rust.rs b/openpgp/src/crypto/backend/rust.rs
index dc4773ed..1edfa1a9 100644
--- a/openpgp/src/crypto/backend/rust.rs
+++ b/openpgp/src/crypto/backend/rust.rs
@@ -17,8 +17,8 @@ pub fn backend() -> String {
/// Fills the given buffer with random data.
pub fn random(buf: &mut [u8]) {
- use rand07::rngs::OsRng;
- use rand07::RngCore;
+ use rand::rngs::OsRng;
+ use rand::RngCore;
OsRng.fill_bytes(buf)
}
diff --git a/openpgp/src/crypto/backend/rust/asymmetric.rs b/openpgp/src/crypto/backend/rust/asymmetric.rs
index 7c4785e2..c8b5f369 100644
--- a/openpgp/src/crypto/backend/rust/asymmetric.rs
+++ b/openpgp/src/crypto/backend/rust/asymmetric.rs
@@ -8,7 +8,7 @@ use std::convert::TryFrom;
use std::time::SystemTime;
use num_bigint_dig::{traits::ModInverse, BigUint};
-use rand07::rngs::OsRng;
+use rand::rngs::OsRng;
use rsa::{PaddingScheme, RSAPublicKey, RSAPrivateKey, PublicKey, PublicKeyParts, Hash};
use crate::{Error, Result};
diff --git a/openpgp/src/crypto/backend/rust/ecdh.rs b/openpgp/src/crypto/backend/rust/ecdh.rs
index 8531013d..ac306ff7 100644
--- a/openpgp/src/crypto/backend/rust/ecdh.rs
+++ b/openpgp/src/crypto/backend/rust/ecdh.rs
@@ -2,7 +2,7 @@
use std::convert::TryInto;
-use rand07::rngs::OsRng;
+use rand::rngs::OsRng;
use crate::{Error, Result};
use crate::crypto::SessionKey;