diff options
Diffstat (limited to 'vendor/signature/src/hazmat.rs')
-rw-r--r-- | vendor/signature/src/hazmat.rs | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/vendor/signature/src/hazmat.rs b/vendor/signature/src/hazmat.rs index 8119225c6..d2f3e9523 100644 --- a/vendor/signature/src/hazmat.rs +++ b/vendor/signature/src/hazmat.rs @@ -5,18 +5,14 @@ //! //! Using them incorrectly can introduce security vulnerabilities. Please //! carefully read the documentation before attempting to use them. -//! -//! To use them, enable the `hazmat-preview` crate feature. Note that this -//! feature is semi-unstable and not subject to regular 1.x SemVer guarantees. -//! However, any breaking changes will be accompanied with a minor version bump. -use crate::{Error, Signature}; +use crate::Error; -#[cfg(feature = "rand-preview")] -use crate::rand_core::{CryptoRng, RngCore}; +#[cfg(feature = "rand_core")] +use crate::rand_core::CryptoRngCore; /// Sign the provided message prehash, returning a digital signature. -pub trait PrehashSigner<S: Signature> { +pub trait PrehashSigner<S> { /// Attempt to sign the given message digest, returning a digital signature /// on success, or an error if something went wrong. /// @@ -33,9 +29,8 @@ pub trait PrehashSigner<S: Signature> { } /// Sign the provided message prehash using the provided external randomness source, returning a digital signature. -#[cfg(feature = "rand-preview")] -#[cfg_attr(docsrs, doc(cfg(feature = "rand-preview")))] -pub trait RandomizedPrehashSigner<S: Signature> { +#[cfg(feature = "rand_core")] +pub trait RandomizedPrehashSigner<S> { /// Attempt to sign the given message digest, returning a digital signature /// on success, or an error if something went wrong. /// @@ -50,13 +45,13 @@ pub trait RandomizedPrehashSigner<S: Signature> { /// implementation to decide. fn sign_prehash_with_rng( &self, - rng: impl CryptoRng + RngCore, + rng: &mut impl CryptoRngCore, prehash: &[u8], ) -> Result<S, Error>; } /// Verify the provided message prehash using `Self` (e.g. a public key) -pub trait PrehashVerifier<S: Signature> { +pub trait PrehashVerifier<S> { /// Use `Self` to verify that the provided signature for a given message /// `prehash` is authentic. /// |