mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Support passing both borrowed and owned Rngs
This commit is contained in:
parent
7de65dc32c
commit
20fd561482
1 changed files with 1 additions and 1 deletions
|
|
@ -621,7 +621,7 @@ impl RistrettoPoint {
|
||||||
/// discrete log of the output point with respect to any other
|
/// discrete log of the output point with respect to any other
|
||||||
/// point should be unknown. The map is applied twice and the
|
/// point should be unknown. The map is applied twice and the
|
||||||
/// results are added, to ensure a uniform distribution.
|
/// results are added, to ensure a uniform distribution.
|
||||||
pub fn random<T: Rng + CryptoRng>(rng: &mut T) -> Self {
|
pub fn random<T: Rng + CryptoRng>(mut rng: T) -> Self {
|
||||||
let mut uniform_bytes = [0u8; 64];
|
let mut uniform_bytes = [0u8; 64];
|
||||||
rng.fill(&mut uniform_bytes);
|
rng.fill(&mut uniform_bytes);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue