mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
sdk/crypto/blind: Don't use generics for fn random()
This commit is contained in:
@@ -21,6 +21,7 @@ use darkfi_serial::{async_trait, AsyncDecodable, AsyncEncodable};
|
||||
use darkfi_serial::{Decodable, Encodable, SerialDecodable, SerialEncodable};
|
||||
|
||||
use pasta_curves::{group::ff::Field, pallas};
|
||||
use rand_core::{CryptoRng, RngCore};
|
||||
|
||||
#[cfg(feature = "async")]
|
||||
pub trait EncDecode: Encodable + Decodable + AsyncEncodable + AsyncDecodable {}
|
||||
@@ -37,7 +38,7 @@ pub struct Blind<F: Field + EncDecode>(pub F);
|
||||
impl<F: Field + EncDecode> Blind<F> {
|
||||
pub const ZERO: Self = Self(F::ZERO);
|
||||
|
||||
pub fn random<RngCore: rand_core::RngCore>(rng: &mut RngCore) -> Self {
|
||||
pub fn random(rng: &mut (impl CryptoRng + RngCore)) -> Self {
|
||||
Self(F::random(rng))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user