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
10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,20 @@ features = ["nightly"]
keccak = { version = "0.1.0", default-features = false }
byteorder = { version = "1.2.4", default-features = false }
zeroize = { version = "1", default-features = false, features = ["zeroize_derive"] }
rand_core = { version = "0.6", default-features = false }
rand_core = { version = "0.9.3", default-features = false }
hex = {version = "0.3", default-features = false, optional = true}

[dev-dependencies]
strobe-rs = "0.5"
curve25519-dalek = { version = "4", package = "curve25519-dalek-ng" }
rand_chacha = "0.3"
curve25519-dalek = { version = "4.1.3", features = ["rand_core"] }
rand_chacha = "0.9.0"
rand = { version = "0.9.0"}

[features]
default = ["std"]
nightly = []
debug-transcript = ["hex"]
std = ["rand_core/std", "byteorder/std"]

[patch.crates-io]
curve25519-dalek = { git = "https://github.com/nresare/curve25519-dalek", branch = "bump-rand-0.9" }
8 changes: 1 addition & 7 deletions src/transcript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ impl Transcript {
/// [`Transcript`] to an owned [`TranscriptRng`] as follows:
/// ```
/// # extern crate merlin;
/// # extern crate rand_core;
/// # use merlin::Transcript;
/// # fn main() {
/// # let mut transcript = Transcript::new(b"TranscriptRng doctest");
Expand All @@ -246,7 +245,7 @@ impl Transcript {
/// .build_rng()
/// .rekey_with_witness_bytes(b"witness1", witness_data)
/// .rekey_with_witness_bytes(b"witness2", more_witness_data)
/// .finalize(&mut rand_core::OsRng);
/// .finalize(&mut rand::rng());
/// # }
/// ```
/// In this example, the final `rng` is a PRF of `public_data`
Expand Down Expand Up @@ -366,11 +365,6 @@ impl rand_core::RngCore for TranscriptRng {
self.strobe.meta_ad(&dest_len, false);
self.strobe.prf(dest, false);
}

fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), rand_core::Error> {
self.fill_bytes(dest);
Ok(())
}
}

impl rand_core::CryptoRng for TranscriptRng {}
Expand Down