pub trait RandomizedPrehashSigner<S> {
// Required method
fn sign_prehash_with_rng<R: TryCryptoRng + ?Sized>(
&self,
rng: &mut R,
prehash: &[u8],
) -> Result<S, Error>;
}Expand description
Sign the provided message prehash using the provided external randomness source, returning a digital signature.
Required Methods§
Sourcefn sign_prehash_with_rng<R: TryCryptoRng + ?Sized>(
&self,
rng: &mut R,
prehash: &[u8],
) -> Result<S, Error>
fn sign_prehash_with_rng<R: TryCryptoRng + ?Sized>( &self, rng: &mut R, prehash: &[u8], ) -> Result<S, Error>
Attempt to sign the given message digest, returning a digital signature on success, or an error if something went wrong.
The prehash parameter should be the output of a secure cryptographic hash function.
This API takes a prehash byte slice as there can potentially be many compatible lengths
for the message digest for a given concrete signature algorithm.
Allowed lengths are algorithm-dependent and up to a particular implementation to decide.
§Errors
Returns Error in the event prehash is an invalid length, or if an internal error
in the provided rng occurs.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.