mirror of
https://github.com/RustCrypto/signatures
synced 2026-06-21 13:45:42 +00:00
ecdsa: restore RandomizedSigner<der::Signature> (#960)
This commit is contained in:
@@ -346,6 +346,24 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "der")]
|
||||
impl<C> RandomizedSigner<der::Signature<C>> for SigningKey<C>
|
||||
where
|
||||
C: EcdsaCurve + CurveArithmetic + DigestPrimitive,
|
||||
Scalar<C>: Invert<Output = CtOption<Scalar<C>>>,
|
||||
SignatureSize<C>: ArraySize,
|
||||
der::MaxSize<C>: ArraySize,
|
||||
<FieldBytesSize<C> as Add>::Output: Add<der::MaxOverhead> + ArraySize,
|
||||
{
|
||||
fn try_sign_with_rng<R: TryCryptoRng + ?Sized>(
|
||||
&self,
|
||||
rng: &mut R,
|
||||
msg: &[u8],
|
||||
) -> Result<der::Signature<C>> {
|
||||
RandomizedSigner::<Signature<C>>::try_sign_with_rng(self, rng, msg).map(Into::into)
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Other trait impls
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user