Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions botan/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rust-version = "1.85"

[dependencies]
botan-sys = { version = "1.20260506", path = "../botan-sys" }
rand = { version = "0.9.2", default-features = false, optional = true }
rand_core = { version = "0.10", default-features = false, optional = true }

[dev-dependencies]
wycheproof = { version = "0.6", default-features = false, features = ["aead", "cipher", "dsa", "ecdh", "ecdsa", "eddsa", "hkdf", "keywrap", "mac", "primality", "rsa_enc", "rsa_sig", "xdh"] }
Expand All @@ -27,7 +27,7 @@ std = []
vendored = ["botan-sys/vendored"]
static = ["botan-sys/static"]
pkg-config = ["botan-sys/pkg-config"]
rand = ["dep:rand"]
rand = ["dep:rand_core"]

[lints.clippy]
# introduced because of from_str
Expand Down
4 changes: 2 additions & 2 deletions botan/src/rng.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl RandomNumberGenerator {
}

#[cfg(feature = "rand")]
impl rand::TryRngCore for RandomNumberGenerator {
impl rand_core::TryRng for RandomNumberGenerator {
type Error = Error;

fn try_next_u32(&mut self) -> Result<u32> {
Expand All @@ -188,4 +188,4 @@ impl rand::TryRngCore for RandomNumberGenerator {
}

#[cfg(feature = "rand")]
impl rand::TryCryptoRng for RandomNumberGenerator {}
impl rand_core::TryCryptoRng for RandomNumberGenerator {}
2 changes: 1 addition & 1 deletion botan/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ fn test_rng() -> Result<(), botan::Error> {

#[cfg(feature = "rand")]
{
use rand::TryRngCore;
use rand_core::TryRng;

let read1 = rng.try_next_u32()?;
let read2 = rng.try_next_u32()?;
Expand Down
Loading