Struct distrand::Secret [−][src]
pub struct Secret<T, M> where
M: Mac, { /* fields omitted */ }
An individual participant's contribution to a randomly generated number.
Methods
impl<T, M> Secret<T, M> where
M: Mac,
[src]
impl<T, M> Secret<T, M> where
M: Mac,
pub fn new<R>(rng: &mut R, value: T) -> Self where
R: Rng + CryptoRng,
[src]
pub fn new<R>(rng: &mut R, value: T) -> Self where
R: Rng + CryptoRng,
Returns a new secret with the given value
and a randomly generated
salt.
impl<T, M> Secret<T, M> where
M: Mac,
T: Serialize,
[src]
impl<T, M> Secret<T, M> where
M: Mac,
T: Serialize,
pub fn commit(&self) -> Result<Commit<T, M>>
[src]
pub fn commit(&self) -> Result<Commit<T, M>>
Create a new Commit
that can be used to validate a Secret during the
reveal phase.