Struct schnorr_fun::nonce::Synthetic [−][src]
pub struct Synthetic<H, R> { /* fields omitted */ }
Expand description
A nonce generator that uses an RNG to mix in real randomness into the nonce generation.
The rng needs to implmenet NonceRng
. This is done already for
GlobalRng
.
Examples
use rand::rngs::ThreadRng; use secp256kfun::nonce; use sha2::Sha256; // the usual way to use this. let nonce_gen = nonce::Synthetic::<Sha256, nonce::GlobalRng<ThreadRng>>::default(); // or OsRng let nonce_gen = nonce::Synthetic::<Sha256, _>::new(my_rng); // BYO rng you've implemented NonceRng for
Implementations
Trait Implementations
Auto Trait Implementations
impl<H, R> RefUnwindSafe for Synthetic<H, R> where
H: RefUnwindSafe,
R: RefUnwindSafe,
impl<H, R> UnwindSafe for Synthetic<H, R> where
H: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a new instance of the invocant that will be marked with M
. Read more
type Output = T
type Output = T
Should always be Self