diff --git a/signature/src/hazmat.rs b/signature/src/hazmat.rs index cfd274f82..4c549af9c 100644 --- a/signature/src/hazmat.rs +++ b/signature/src/hazmat.rs @@ -99,9 +99,9 @@ pub trait AsyncRandomizedPrehashSigner { /// /// Allowed lengths are algorithm-dependent and up to a particular /// implementation to decide. - async fn sign_prehash_with_rng_async( + async fn sign_prehash_with_rng_async( &self, - rng: &mut impl CryptoRngCore, + rng: &mut R, prehash: &[u8], ) -> Result; } diff --git a/signature/src/signer.rs b/signature/src/signer.rs index dcb322490..a6c2813f8 100644 --- a/signature/src/signer.rs +++ b/signature/src/signer.rs @@ -186,7 +186,7 @@ where #[allow(async_fn_in_trait)] pub trait AsyncRandomizedSigner { /// Sign the given message and return a digital signature - async fn sign_with_rng_async(&self, rng: &mut impl CryptoRngCore, msg: &[u8]) -> S { + async fn sign_with_rng_async(&self, rng: &mut R, msg: &[u8]) -> S { self.try_sign_with_rng_async(rng, msg) .await .expect("signature operation failed") @@ -197,9 +197,9 @@ pub trait AsyncRandomizedSigner { /// /// The main intended use case for signing errors is when communicating /// with external signers, e.g. cloud KMS, HSMs, or other hardware tokens. - async fn try_sign_with_rng_async( + async fn try_sign_with_rng_async( &self, - rng: &mut impl CryptoRngCore, + rng: &mut R, msg: &[u8], ) -> Result; } @@ -209,9 +209,9 @@ impl AsyncRandomizedSigner for T where T: RandomizedSigner, { - async fn try_sign_with_rng_async( + async fn try_sign_with_rng_async( &self, - rng: &mut impl CryptoRngCore, + rng: &mut R, msg: &[u8], ) -> Result { self.try_sign_with_rng(rng, msg)